Hello,
Doing this is going to be a *huge* mess.
Inheritance is going to be *really* hard to stub out. I am not sure how you would get
it to compile. It is pretty easy to do with something like System.dll + System.Xml.Dll
where the dependency is very limited (the dependency is basically that System.Xml.dll
depends on System.Net, and System.Net depends on config which depends on System.Xml.
The solution is to build a bootstrap System.Xml library without System.Net support).
For example, if you need to have:
Stub:
abstract class Foo {
abstract MyClass Doit (int i);
}
Object:
class MyClass {}
classy MyFoo : Foo {
override MyClass DoIt (int i) {}
}
I don't think there is a way to bootstrap this. (well, there are some hacks you can do
with IL code, however, it is very messy).
The easiest way around this is to use CodeDOM to compile your assembly. ASP.NET uses
this solution.
Max is right here. Chicken/Egg is a design problem. The BCL is an exception because it
needs to build the platform basically from scratch.
-- Ben
>>> "Jaroslaw Kowalski" <[EMAIL PROTECTED]> 02/26/04 02:32 AM >>>
I need (as an option) this for my O/R mapping software because I want to be
able to use mutliple languages.
I have:
1. "Stubs" assembly - written in C# - that must be able to create objects
from "Objects" assembly to represent 1-1 relations and 1-N relations.
2. "Objects" assembly - written in some other language whose classes inherit
from the appropriate classes in "Stubs" assembly
So I have a mutual dependency here. But as I've said this is optional. If
you stict to C# you have just a single assembly with no interdependencies.
Jarek
----- Original Message -----
From: "max" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 4:35 AM
Subject: Re: [Mono-list] Compiling egg-chicken libraries
> shouldn't you avoid such situations in the first place ?
> Isn't this a design issue, more than a compilation issue ?
>
> On Tuesday 24 February 2004 05:16, Jaroslaw Kowalski wrote:
> > I've had similar problem and looks like there's no general-purpose
> > solution.
> >
> > I deal with it by creating a stub version of one library, compiling the
> > other library against it and then recompiling the first library against
> > just built second library.
> >
> > The stub contains nothing but public API of the library that's used by
the
> > second library.
> >
> > Jarek
> > ----- Original Message -----
> > From: "Martin Tsachev" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 24, 2004 2:03 PM
> > Subject: [Mono-list] Compiling egg-chicken libraries
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > I have some code that compiles in Visual Studio but I didn't have much
luck
> > trying to compile it with mono. The problem is that I have lib1 and lib2
> > and each instantiates an object with a class definition in the other
> > library.
> >
> > I found in the archive that I can compile the libraries with mcs
/t:library
> > lib1.cs -r... I get this error
> >
> > lib1.cs (line) error CS0246: Cannot find type 'lib2.foo'
> >
> > The same happens if I try to compile lib2. I tried with -r:lib1.cs but
it
> > didn't quite like it.
> >
> > Also is there a way that I can automate the whole compiling process,
maybe
> > if
> > not direct I can dig into Makefiles and write one?
> >
> > - --
> > Martin Tsachev
> > http://martin.f2o.org
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.3 (GNU/Linux)
> >
> > iD8DBQFAO0unypytlz9Py3wRAk3sAJ9W3Y1MUASk2LwTGursdJIBl+7E3ACgqBYG
> > kr5zz7Bl41qjloGHqJ/ncwU=
> > =EaFM
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > Mono-list maillist - [EMAIL PROTECTED]
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
> > _______________________________________________
> > Mono-list maillist - [EMAIL PROTECTED]
> > http://lists.ximian.com/mailman/listinfo/mono-list
> _______________________________________________
> Mono-list maillist - [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list