Nemerle, references version dependency problem and suggested solution.

18 views
Skip to first unread message

emp...@gmail.com

unread,
Dec 24, 2012, 12:18:49 PM12/24/12
to nemer...@googlegroups.com
Suppose we are building a new class library "MyLibrary".
* We decided to make use, "A.dll" version 1.1.0.0 and A has a dependency to "B.dll" version 1.1.0.0.
* Then B.dll version "1.2.0.0" is published by the vendor and it has some real nice features we want to use. On the other hand we also need to use A version 1.1.0.0.

So we both reference A 1.1.0.0 and B 1.2.0.0, the compiler will complain that it cannot find B version 1.1.0.0 since Nemerle compiler at runtime tries to load the assemblies via reflection to resolve the types.
So we fail. Even though if we could only achieve compilation , we could have made used of these dlls on runtime via "Binding redirections"
If we were using C#, compilation would just succeed. And then we add Binding redirections voila it works.

This scenario appears to be a serious problem sometimes. And since Nemerle uses reflection the options are not much. However a possibility is that we can make use of AppDomain.AssemblyResolve event to hook into such failures inside nemerle compiler
and retry with just by "Assembly name" and disregarding the version info. "pick first dll found with the same name maybe".

We can easily add such feature to the compiler. What do you think ?

Alexander Zimin

unread,
Dec 25, 2012, 10:35:50 AM12/25/12
to nemer...@googlegroups.com
I has few discussions about that problem with Vlad by last year. Your solution he named "dynamic" and reject it. Other solution, freeze runtime public interface and version on minor releases, was rejected too becouse nobody can guaranted that.

IMHO, it's a biggest problem for any external [macro] library develper and nuget package publishers.

вторник, 25 декабря 2012 г., 1:18:49 UTC+8 пользователь emp...@gmail.com написал:

NN

unread,
Dec 30, 2012, 3:19:19 PM12/30/12
to nemer...@googlegroups.com
So which solution Vlad suggests ?
According to your words, he suggests nothing, so why not improving the situation ?

Even if Vlad disagrees and everybody agrees, why can't we do it ?
Reply all
Reply to author
Forward
0 new messages