Hi Ayende,
Is it really true that there are breaking changes in *every* build? I
doubt it.
.NET doesn't distinguish between major, minor, build, or revision
numbers. If the entire AssemblyVersion is not an exact match to what
was referenced when the binary was compiled, the runtime binding fails
(at least in .NET 2.0). So this implies that every build is
incompatible and non-interchangeable with any other build. This is
unlikely to be true for every single build.
Although not a problem for unit tests, which are re-compiled
frequently, the problem arises if, for example, I factor out my custom
constraints (each derived from
Rhino.Mocks.Constraints.AbstractConstraint) into a shared library, and
distribute this library as a binary. Any projects using these
constraints would need to upgrade their version of Rhino Mocks in step
with upgrades to the version of Rhino Mocks referenced by the library.
If I compile the library against Rhino Mocks version 1.1.1.1 then I'm
distributing constraints derived from type {Rhino.Mocks,
Rhino.Mocks.Constraints.AbstractConstraint, 1.1.1.1}. If I were to
then try using this in a test running with Rhino.Mocks 1.1.2.1 this
will fail, because AbstractConstraint from Rhino.Mocks with
AssemblyVersion 1.1.2.1 is considered a different type from the
AbstractConstraint found in Rhino.Mocks with AssemblyVersion 1.1.1.1.
Does this make sense?
Is it unreasonable to propose that the AssemblyFileVersion be updated
with every build (for information reasons) but the AssemblyVersion be
*only* updated when there are actual breaking changes which mean that
the new version of Rhino Mocks can no longer be cleanly substituted
for a previous version?
Regards,
Daniel Fortunov
On Dec 18, 6:48 am, "Ayende Rahien" <[email protected]> wrote:
> That is the build version that keep changing, not the minor / major
> versions, which indicate possible breaking changes.
> On Fri, Dec 12, 2008 at 12:38 PM, Daniel Fortunov <
>
> [email protected]> wrote:
>
> > Looking at
> >https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/com...
> > it appears that the AssemblyVersion attribute is updated with every
> > build.
>
> > <property overwrite="false" name="assembly.version" value="$
> > {project.major}.${project.minor}.${project.build}.0" />
> > ...
> > <attribute type="AssemblyVersionAttribute" value="$
> > {assembly.version}" />
>
> > I believe this is a mistake because it implies that every build is
> > incompatible and non-interchangeable with any other build.
>
> > For example, if I factor out my custom constraints (each derived from
> > Rhino.Mocks.Constraints.AbstractConstraint) into a shared library, all
> > code using that library would need to upgrade their version of Rhino
> > Mocks in step with upgrades to the version of Rhino Mocks referenced
> > by the library.
>
> > Visual Studio also generates the somewhat intractable warning "Found
> > conflicts between different versions of the same dependent assembly."
> > which appears to be caused by this.
>
> > Is it unreasonable to propose that the AssemblyFileVersion be updated
> > with every build (for information reasons) but the AssemblyVersion be
> > *only* updated when there are breaking changes which mean that the new
> > version of Rhino Mocks can no longer be cleanly substituted for a
> > previous version?
>
> > Your thoughts?
>
> > Regards,
> > Daniel Fortunov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---