[MLton] MLTONVERSION for non-release builds

Matthew Fluet fluet at tti-c.org
Sun Aug 24 20:44:23 PDT 2008


On Sun, 24 Aug 2008, Wesley W. Terpstra wrote:
> I have many different MLton toolchains on different platforms and machines.
> It is often confusing to me which build has which patches applied,
> especially when I come back to a computer after some time away. Release
> versions of MLton include a release date as their version information.
> Builds from svn/HEAD though just report MLTONVERSION. Since I imagine most
> of the MLton developers work exclusively with svn builds and not release
> builds, I think it would be helpful if we included the svn revision number
> the compiler was built from. eg:
> $ mlton
> MLton r6673 (built Sun Aug 24 05:10:14 2008 on carrot)

For a while, my workflow has simply been to copy the svn working directory 
(e.g., mlton.svn.cardmap-in-heap) and to never have anything but a 
(recent) svn trunk mlton on my path.  The price is that I need to give 
explicit paths to my work-in-progress builds.

> I know that this information comes from control-flags.sml. There is a
> subversion tag "$Rev$" which gets replaced with the file version, but what
> we really want is the revision of the tree's root. Does anyone know the
> relevant subverison magic? Also, will this break whatever script creates
> MLton releases? (ie: does it look for MLTONVERSION)

There is a 'svnversion' command that can be used to produce a compact 
'version number' for a working copy.  That ought to be useful, as it 
indicates the range of versions in the working copy and whether there are 
any uncommitted changes.

There is a sed replacement of MLTONVERSION in the root Makefile.  Making a 
source release just uses 'make version; make clean-svn' and a 'tar'.



More information about the MLton mailing list