[Mono-docs-list] The future of monodoc.dll
Jonathan Pryor
jonpryor at vt.edu
Sat Mar 22 09:47:55 EDT 2008
One of the things I'd like to do before the Mono 2.0 release is migrate
monodoc.dll to use C# 2.0 features such as generics in the public API.
For example, instead of Monodoc.Node.Nodes being an ArrayList, it should
be an IEnumerable<Node> or IList<Node>, and Monodoc.Node should
implement IComparable<Node>, etc.
However, I'm not sure that this can actually be done, as monodoc.dll is
installed into the GAC, and such an API change would break any existing
clients on upgrade.
Consequently, I thought I'd throw out another idea: #ifs and changing
the assembly name.
Instead of building just monodoc.dll, we could build both monodoc.dll
and a Mono.Documentation.dll. monodoc.dll would remain .NET 1.0
compatible, Mono.Documentation.dll would be for .NET 2.0, and we could
use #if's to keep the two separate:
#if NET_2_0
using NodeList = System.Collections.Generic.IList<Mono.Documentation.Node>;
#else
using NodeList = System.Collections.ArrayList;
#endif
public class Node : IComparable
#if NET_2_0
, IComparable<Node>
#endif
{
public NodeList Nodes {...}
}
This is similar/identical to what we do in mcs/class.
The alternatives are to:
1. Keep monodoc.dll as .NET 1.0 only -- no generics, etc.
2. Migrate monodoc.dll to .NET 2.0, and change the assembly version
number. Problem is that the 1.0 monodoc.dll couldn't be built anymore
without using e.g. the monodoc-1.9.tar.gz file.
3. Keep monodoc.dll, and use a different set of source files to build
the .NET 2.0 Mono.Documentation.dll. Perhaps it could use the 1.0
monodoc.dll as part of its implementation...?
4. Something else?
Thoughts?
- Jon
More information about the Mono-docs-list
mailing list