[IronPython] Feedback needed for bug fix:Import pre-compiledmodules

J. Merrill jvm_cop at spamcop.net
Tue Jan 23 16:22:09 CET 2007


I'm not arguing with you -- just playing devil's advocate.  Isn't "everyone has to use the same centrally maintained copy of a DLL" the recipe for "DLL hell" that .Net is supposed to let us avoid?  In the specific scenario you provide -- you update a DLL used by an existing EXE -- .Net is designed to keep using the old version of the DLL unless you either re-compile to re-build the EXE, or add an entry to the EXE's .config file that tells it that it's ok to use the newer one.  (That only applies for DLLs in the GAC, as I understand it.)

.Net isn't supposed to load app X that references DLL Y unless the "identity" of Y is the identity listed in the manifest for app X.  Changing the identity of a DLL can be done by changing its version number; unfortunately, unless the DLL is installed in the GAC, you can't have two copies of the same DLL differing only in their version and have "the right one" (the one referenced by the EXE, or pointed to by the EXE's config file) load.

Sigh.

At 12:38 AM 1/23/2007, Keith J. Farmer wrote
>Why do you assume the deployment will involve dropping IronPython in the application directory?  Sure, you *could*, but it's unreasonable, I think, to force the end user to have Yet Another Copy of a dll when it could just reference the latest-and-greatest at a central location.
>
>The situation I see is:
>
>Install IronPython.
>Install a binaries-only IP app.
>Update IronPython to change a spelling error in a resource -- suddenly the app doesn't even load.
>
>So, for binaries-only, the situation's just plain broken.  Granted, I'd wager that most Python is distributed with source (if not as source).
>
>Another alternative?  Use explicit interfaces in the IronPython runtime to allow side-by-side versioning of the API.  The exe's bootstrapper can load IronPython.dll without using the strong name, grab the runtime, cast to that interface and deal with versioning issues for some period of time before obsoletion.  This would also allow developers to switch compatibility levels when testing their programs.
>
>-----Original Message-----
>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. Merrill
>Sent: Monday, January 22, 2007 8:03 PM
>To: Discussion of IronPython
>Subject: Re: [IronPython] Feedback needed for bug fix:Import pre-compiledmodules
>
>Could IP just ignore the timestamp on ironpython.dll and let the .Net runtime figure out if there are any references to no-longer-present mechanisms within the binary?
>
>Keith, is it really the case that your clients without Python source are going to download new versions of IP and (this is important) put them in the directory with your software?  That is, assuming that you put IP.DLL in the directory with the EXEs/DLLs you built, even if they're doing their own IP development elsewhere on the machine and updating it regularly, won't your executables use the old IP.DLL until you give them the new one (and presumably matching recompiled EXEs/DLLs)?
>
>At 09:24 PM 1/22/2007, Keith J. Farmer wrote
>>the upgraded-ironpython scenario
>>
>>>>> I do not think this is supported. The pre-compiled module has much dependency on IronPython.dll. Some emitted calls in those modules could be changed (or removed) in the next version of IronPython.dll.
>>
>> 
>>That makes me itch...  I understand runtime dependencies, but the binaries-only deployment scenario just dropped in value if they are completely invalidated because the runtime undergoes a minor rev (or is otherwise touched).
>> 
>>Would it be possible for the runtime to query the assembly to determine if it's compatible or not?  Some sort of poor man's static analysis (eg, a manifest of API dependencies could be generated when the assembly is stored to disk, and if the runtime doesn't find any in the list that match any breaking change from the producing version, it accepts it).
>> 
>>
>>________________________________
>>
>>From: users-bounces at lists.ironpython.com on behalf of Haibo Luo
>>Sent: Mon 1/22/2007 4:44 PM
>>To: Discussion of IronPython
>>Subject: Re: [IronPython] Feedback needed for bug fix:Import pre-compiledmodules
>>
>>
>>
>>If ironpython.dll is newer than lib.exe, and lib.py does not exist, we should expect an exception? 
>>
>>>>> Yes
>>
>>[snip]
>
>
>J. Merrill / Analytical Software Corp
>
>
>_______________________________________________
>users mailing list
>users at lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>_______________________________________________
>users mailing list
>users at lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


J. Merrill / Analytical Software Corp





More information about the Ironpython-users mailing list