Re: [Madeleine-devel] automatic_experimental news
Status: Beta
Brought to you by:
ndrs
From: Anders B. <ndr...@ya...> - 2004-07-31 19:49:39
|
Stephen Sykes wrote: > You may have seen some activity in the experimental branch in the cvs... I > have been busy making it better, and completing an upgrade facility. Cool! How does the upgrade work? upgrade.rb seems to contain a lot of familiar-looking code, is that simply the old implementation of automatic commands, that are used to load the old snapshots? > In testing the upgrade process I found a circular reference case that the > old system handles incorrectly - to do with passing "self" as an argument > inside an automatic system. Look in test_automatic classes L and M to see > what I mean. > > Anyway, we assume our users don't do this, and I have a work around in the > experimental branch where if you want to pass self, you use self.proxy > instead. I guess we can't identify when self is being passed? I recall that Java's EJB specification has a similar solution, that you aren't allowed to pass around 'this' but have to get the proxy instead. > Automatic_experimental will automatically upgrade from the previous version > through a rescue mechanism. But this is only possible just now from a just > snapshotted system - no commands. Here is the rescue clause: [---] > @upgraded = true Shouldn't there be some version number or something instead of a boolean, in case we need to change the format again? > Notice the use of CommandLog.log_file_names to detect if there are any > commands there. This is not a documented API though - Anders: are you > planning some file maintenance APIs? I was thinking of doing the file maintenance things sort of separately, dealing directly with the filesystem and very little with the rest of Madeleine. At the same time I'm working on wrapping Ruby's file I/O APIs to make the testing of Madeleine's core easier. I now see that these things could probably be combined in some nice way. I'll see what kind of API I can make. /Anders |