-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Je Lundo 07 Majo 2001 13:53, vi skribis: > I have this prototype for versioning. Tell me what you think of it. The more I look at this, the more I like it. I've been needing this in Java for a while. What do you think about a version which allows for intelligent loading, so that multiple versions of a module/library can exist on a platform at once? For example: def require(file, proc) ... found = getAllVersions(file).reverse.find { |inst| proc.call $require_versions[inst] } if found.nil? then raise VersionError.new filename,version,me[2] ... end Where getAllVersions finds all files in the search path by the name #{file}(_(\d+(\.\d+)*))?\.rb, in order of the version numers. Ergo, we'll always get the newest compatible version of the library. I mention this because as Ruby ages, it is going to encounter the conflicting library version problems that are plaguing Java at the moment. Some older apps will require an earlier version of a library than newer apps require, and tracking these different library versions will become difficult. Linux manages this by allowing multiple versions of the same library to co-exist, and I believe that Ruby should, as well. Mathieu's code is a good start of a proper library versioning system. For that matter, the Ruby library installation mechanism could be extended to allow library authors to intelligently manage their libraries. For example, say I install the brand new SuperUtils package 1.0 on my system. The installation package has some rules file which specifies: install_rules 1,0 compatible 0,0 This gets installed as superutils_1.0.rb. The SuperUtils auther releases a non-backwards compatible version 2.0. This gets installed by the inconcurrently beside the 1.0 version on my system: install_rules 2,0 compatible 2,0 so that I have superutils_1.0.rb and superutils_2.0.rb. Soon after, the author releases version 2.1, 2.2, and 2.3 in rapid succession, which are all backwards compatible with version 2.0. I only grab the 2.3 version install_rules 2,3 compatible 2,0 so now I have superutils_1.0.rb and superutils_2.3.rb. === SER Deutsch|Esperanto|Francaise|Linux|Java|Aikido|Dirigibles|GPG === http://www.germane-software.com/~ser jabber.com:ser ICQ:83578737 "Never judge a man till you have walked a mile in his shoes, 'cuz by then, he's a mile away, you've got his shoes, and you can say whatever the hell you want to." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6+ubHP0KxygnleI8RAp4hAJwI95oE4LTKEKGB95Ux74ENW9cX4gCgv0Pf kvgQdq4i7ZiAMtEK15AEk5c= =bQNj -----END PGP SIGNATURE-----