[Mono-list] SPAM-LOW: Re: NUnit Version - Upgrade soon?

Charlie Poole cpoole at pooleconsulting.com
Tue Nov 25 15:43:13 EST 2008


Hi Gert, 

> NUnit requires the nunit.framework assembly to be either in 
> the GAC, or in the same directory as the test assembly.

Actually, it would be more correct to say that the CLR requires
assemblies to be installed in the GAC or in the probing path
or the appbase/probingpath of the test assembly. NUnit would
need to do some special tricks to force loading of the framework
into the test domain with the test assembly.

> I would like to see this changed, but Charlie (NUnit) prefers 
> to keep things as is.

I'm not very confident about special loading tricks. They can
come back to bite you later. We've discussed this before, but
I'll summarize for the others on the thread:

1) Conceptually, the NUnit framework is not a part of NUnit,
it's a part of the user tests.

2) The framework doesn't execute the tests, rather the tests
reference the framework.

3) NUnit (or if you like, the rest of NUnit) does not reference
the framework at all. This is what makes it framework-independent.

4) NUnit can run with *any* framework that provides the same
namespaces, classes and methods as nunit.framework.dll. For
example, it can load tests written against the NUnitLite framework.

5) The next release of NUnit will include multiple frameworks,
one built against the 1.1 runtime, one against the 2.0 as well
as at least one version of NUnitLite. The following (3.0) release
will have other alternative frameworks.

It's probably not impossible to do some tricks with loading
the framework but I'm not clear what the payback is. I've worked
on dozens of projects using NUnit where we copied all the 
assemlies needed into a directory before running tests. If
the application needed (for example) a charting assembly, we 
copied it. If a test needed nunit.framework, we copied it.

This seems to be a quite normal part of the build process and
I can only think that NOT needing to copy the nunit framework 
would be source of confusion to developers.

Of course, I understand the reason we look at this differently.
You are viewing nunit.framework as a part of NUnit, which it
should naturally make available in any run. Because framework-
independence was so important, I made changes in version 2.2
to separate the framework from the rest of NUnit and rely
on the names of attributes rather than their type. Since then,
new releases have worked with any version of the framework
going back to 2.0.

> I don't think any of the other assemblies need to be in the 
> GAC though.

For testing purposes, no. If we want to allow alternate runners
to simply find and use an existing NUnit installation, then
either the GAC or some sort of private dynamic load mechanism
is needed.

One issue here is the fact that NUnit is cross-platform. As
you probably know, the GAC is looked on somewhat differently
by the MS and Mono communities. Each time I've proposed use
of the GAC to folks using MS .NET - on the altdotnet list,
for example - there have been lots of objections. Private
installation seems to be preferred by that community.

OTOH, Linux developers are accustomed to shared libraries
and, because of the existence of viable package management
systems, have not experienced "dll hell" as a result. In
this community, use of the GAC seems like a natural 
extension of shared libraries.

Because NUnit's loading of assemblies is central to its
purpose, I'd like to avoid having a different way to do
it on Windows and Linux. So if it's to be in the GAC
on one, then I think it should also be in the GAC on
the other.

I do prefer using the GAC to rolling my own loading
mechanism, btw.

Charlie

>  
> 
> Gert
> 
>  
> 
> PS. I'm copying Charlie in on this, so he can correct me if necessary.
> 
>  
> 
> From: mono-list-bounces at lists.ximian.com 
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Juan 
> C. Olivares
> Sent: dinsdag 25 november 2008 14:50
> To: Sebastien Pouliot
> Cc: mono-list at lists.ximian.com
> Subject: Re: [Mono-list] SPAM-LOW: Re: NUnit Version - Upgrade soon?
> 
>  
> 
> Mono installs its NUnit version on the GAC when you compile 
> mono. If it's a private version, why it's installed on the GAC?
> 
> Regards
> Juan C. Olivares
> 
> On Tue, Nov 25, 2008 at 10:24 AM, Sebastien Pouliot 
> <sebastien.pouliot at gmail.com> wrote:
> 
> Hello Charlie,
> 
> 
> On Mon, 2008-11-24 at 23:38 -0800, Charlie Poole wrote:
> > I didn't know it was your archive, but if you need it then 
> it seemed 
> > to make sense that there would be some changes. If not, why 
> build it 
> > from source at all?
> >
> > This isn't a criticism - just something I'm trying to get an 
> > understanding about. There seems to be some obstacle to 
> NUnit adoption 
> > (I don't mean obsolete versions, but up to date ones) in the Mono 
> > community and I'd like to figure out the reasons.
> 
> You simply did too well on NUnit 2.2 ;-) and no one, until 
> Atsushi, needed the features "badly" enough to update the 
> mono tree (potentially a huge task).
> 
> OTOH this might have been interpreted by other people as being the
> (only?) "supported" version - even if we have been saying, 
> for years, not to confuse the old Mono's version with the 
> latest and greatest NUnit available.
> 
> Sebastien
> 
> 
> >
> > Charlie
> >
> > > -----Original Message-----
> > > From: mono-list-bounces at lists.ximian.com
> > > [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of 
> Atsushi Eno
> > > Sent: Monday, November 24, 2008 10:19 PM
> > > To: mono-list at lists.ximian.com
> > > Subject: Re: [Mono-list] SPAM-LOW: Re: NUnit Version - 
> Upgrade soon?
> > >
> > > It is anything but negative approach. As I wrote earlier, 
> I believe 
> > > this is a mono bug that likely hits other projects and should be 
> > > fixed in mono land.
> > >
> > > I'll try to cook a repro and file a bug.
> > >
> > > For the record, there is almost no change in NUnit code 
> in my archive.
> > > We just have to change AssemblyInfo (assembly key 
> location), remove 
> > > tests (they are extra in our source tree) and extra stuff such as 
> > > GUI.
> > > It is straightforward upstream code. Believe or not, just 
> diff them 
> > > ;)
> > >
> > > Atsushi Eno
> > >
> > >
> > > Charlie Poole wrote:
> > > > I think a more positive approach would be to work with 
> the NUnit 
> > > > project so that you can just use the upstream code.
> > > >
> > > > Charlie
> > > >
> > > >> -----Original Message-----
> > > >> From: mono-list-bounces at lists.ximian.com
> > > >> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of
> > > Atsushi Eno
> > > >> Sent: Saturday, November 22, 2008 4:30 PM
> > > >> To: mono-list at lists.ximian.com
> > > >> Subject: SPAM-LOW: Re: [Mono-list] NUnit Version - 
> Upgrade soon?
> > > >>
> > > >> You almost do not have to do that:
> > > >> http://veritas-vos-liberabit.com/tmp/2008/nunit24-mono.tar.bz2
> > > >>
> > > >> It builds but does not work anyways right now, 
> probably because 
> > > >> of some type resolution bugs between nunit-console.dll and 
> > > >> nunit-console.exe.
> > > >>
> > > >> If you have patch for mono (diff in mono/mcs, not diff in
> > > >> nunit) to fix any issues, that is welcome.
> > > >>
> > > >> Atsushi Eno
> > > >>
> > > >>
> > > >> Michael Franz wrote:
> > > >>> OK,
> > > >>>
> > > >>> I thought I read somewhere that there were patches to NUnit
> > > >> that were
> > > >>> mono specific.
> > > >>>
> > > >>> Is it ok to submit patches to mono that depend on the
> > > >> latest version
> > > >>> of NUnit?
> > > >>>
> > > >>> Michael
> > > >>>
> > > >>> On Tue, Nov 18, 2008 at 3:25 PM, Miguel de Icaza
> > > <miguel at novell.com
> > > >>> <mailto:miguel at novell.com>> wrote:
> > > >>>
> > > >>>     Hello,
> > > >>>
> > > >>>      > What changes to NUnit were specific to Mono?
> > > >>>      >
> > > >>>      > Is there a list of these features?
> > > >>>
> > > >>>     You are confused;   There are no changes, you should
> > > >> just not depend on
> > > >>>     Mono's built-in and private copy of NUnit to write your
> > > >> NUnit test
> > > >>>     cases.
> > > >>>
> > > >>>     You should get the latest NUnit.
> > > >>>
> > > >>>      > On Sun, Nov 16, 2008 at 10:54 PM, Miguel de Icaza
> > > >>>     <miguel at novell.com <mailto:miguel at novell.com>>
> > > >>>      > wrote:
> > > >>>      >         Hello,
> > > >>>      >
> > > >>>      >
> > > >>>      >         > I use NUnit for work and have been using
> > > >> the latest version
> > > >>>      >         for
> > > >>>      >         > months.  I wrote some test for Mono and
> > > >> found out that the
> > > >>>      >         version
> > > >>>      >         > that Mono is using does not support some
> > > >> of the asserts
> > > >>>     I am
> > > >>>      >         using
> > > >>>      >         > (IsEmpty).  Is there any plan to upgrade
> > > >> the version of
> > > >>>      >         NUnit that is
> > > >>>      >         > used with the Mono build/test?
> > > >>>      >
> > > >>>      >
> > > >>>      >         The NUnit that ships with Mono should 
> be considered
> > > >>>     Mono's own
> > > >>>      >         copy of
> > > >>>      >         NUnit and not a public version of it.
> > > >>>      >
> > > >>>      >         We should probably make packages of the
> > > >> latest version of
> > > >>>      >         NUnit,
> > > >>>      >         encourage the NUnit developer to maintain
> > > >> those and encourage
> > > >>>      >         developers
> > > >>>      >         to use the public NUnit as opposed to the
> > > >> private copy that
> > > >>>      >         Mono ships.
> > > >>>      >
> > > >>>      >
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > 
> --------------------------------------------------------------------
> > > -
> > > >> -
> > > >>> --
> > > >>>
> > > >>> _______________________________________________
> > > >>> Mono-list maillist  -  Mono-list at lists.ximian.com 
> > > >>> http://lists.ximian.com/mailman/listinfo/mono-list
> > > >> _______________________________________________
> > > >> Mono-list maillist  -  Mono-list at lists.ximian.com 
> > > >> http://lists.ximian.com/mailman/listinfo/mono-list
> > > >>
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Mono-list maillist  -  Mono-list at lists.ximian.com 
> > > > http://lists.ximian.com/mailman/listinfo/mono-list
> > > >
> > >
> > > _______________________________________________
> > > Mono-list maillist  -  Mono-list at lists.ximian.com 
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> >
> >
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com 
> > http://lists.ximian.com/mailman/listinfo/mono-list
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
>  
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.175 / Virus Database: 270.9.9/1806 - Release 
> Date: 11/22/2008 6:59 PM
> 
> 





More information about the Mono-list mailing list