On 1/26/11 11:58 PM, Blake McBride wrote:
Greetings,
I've got a suggestion regarding the startup message on development versions of abcl. Rather that just saying "-dev" why don't we say "-dev (XXX)" where XXX is the subversion revision number? This would make it much more clear about what you are running, and I'm pretty sure subversion can automatically provide and update this (I am doing it elsewhere).
We kicked this around once running into the following problems:
The version of SVN source is not readable from the filesystem (i.e. via a grep), but needs the SVN libraries to access it. The executable 'svnversion' that does this is not always available (is it available under TotoiseSVN or not? I forget what the answer to this turned out to be…)
The second reason is that we need to keep the Lisp-based build in somewhat of a parity here, since we're talking about modifying the value of LISP-IMPLEMENTATION-VERSION. Not impossible, but extra work than just hacking 'build.xml'.
The third reason is a non-reason: one of the developers (me), actually manages the ABCL source via Mercurial-to-svn bridge, so since the information wouldn't be that useful to me, I wasn't really motivated to provide such a functionality. Since I am the developer who usually ends up hacking the Ant build system, this feature never got addressed.
But given the number of people who track trunk, and that Alan had leaned on us heavily before for this functionality I acknowledge we should probably implement something along these lines. We certainly have a vested interest in more accurate and easy bug reports that this would provide.
A quick description of the outstanding questions for an implementation:
0. Since there is no SVN tag expansion (like $Revision$) that would output the current SVN version, we have to move the canonical value outside of org.armedbear.Version to a separate file. Version.java will then only contain the base value "x.y.z" (i.e. "0.24.0") for the branch.
1. The file 'org/armedbear/lisp/version' will be created during the build process (it currently is) with the base value appended with the string "-<OUTPUT of svnversion>" or "-unknown" if 'svnversion' couldn't be invoked. Examples would be "0.24.0-exported" "0.24.0-12344" "0.24.0-13111:13112M".
2. Production versions will be built without this version file.
3. The current use of "version.src" in 'abcl.properties' (which places the Implementation-Source value in the jar manifest) will be replaced with this mechanism.
4. The code in Version.java will look for the 'version' file on the default classloader. If it exists, it will remember and use this value for future invocations. If it doesn't exist, it will output its base value.
Some problems
1. We would then lose the clear distinction that "0.25.0-dev" conveys (i.e. that this isn't a production version). Should we have a string like "0.25.0-dev-12344"?
2. I'm assuming that branched releases should not include the SVN version, but not exactly sure how to detect that. Maybe place the base value in a top-level file that gets manually changed when we branch?
3. 'exported' is the value that 'svnversion' gives when it can't determine the SVN revision associated with the source. Maybe we should changed this to 'unknown' or something a little more informative? Maybe 'undetermined'?
4. I'd like to indicate to the user that the output of 'svnversion' indicates the SVN version, but "0.24.0-dev-svn-13111:13112M" seems kind of long, but maybe it makes sense (if we follow my solution to problem #1).
Comments, ideas, directions, please.