The problem is that the Gallio interfaces are quite rich. This makes it
difficult to proxy them using ad-hoc means like XML serialization. For
example, the reflection API would be quite intractable to implement in this
manner.
Gallio defines quite a number of contracts of various sorts. In the Alpha
phase, these contracts are still fluid and subject to change at any time.
However in the future such changes before much more difficult.
I've been thinking about System.Addin and Mono.Addin a bit. Despite the
name similarity, they are designed to do rather different things.
System.Addin provides isolation and cross-version compatibility whereas
Mono.Addin provides a declarative extension point model. I'm going to talk
about the former one here.
System.Addin attacks the problem of binary compatibility head on. There is
an extensive list of rules which boil down to creating pure non-versioning
contracts. So when you want to do something new, you need to create a new
contract.
This approach worries me a bit because it will tend to have quite a lot of
overhead. It'll probably result in butchering the object model.
What's worse is that System.Addin takes a very conservative view of binary
compatibility. In fact, you can add new members to an existing class
without violating binary compatibility. So at least most additive changes
can be accomplished in place without breaking anything. Subtractive changes
are harder but can be handled via deprecation.
We can future-proof certain extensibility interfaces by transforming them
into abstract classes instead. That way we can add default do-nothing
implementations for any new operations we might define later. Most of the
rest of the work can be taken care of by binding redirects (already in
place).
What worries me is that any approach taken will require a fair degree of
care and reliance on conventions to avoid breaking stuff.
Does anyone know of any existing tools that can be used to compare assembly
versions and to check binary compatibility contracts? It sounds like a
pretty obvious idea for a tool but I can't find one. Maybe some clever
person has put together some NDepend CQL script to help here.
Suggestions?
Jeff.