[MLton] Bug#220046: mlton: Build-Depends on itself

Stephen Weeks MLton@mlton.org
Mon, 10 Nov 2003 15:58:40 -0800


Hi Roland.  Thanks for the bug report.

> when a package Build-Depends on itself, it can't really "build from
> source".

MLton can be built from source with a binary version of an SML
compiler.  To me, as long as that SML compiler is not the version of
MLton that is being built, then MLton is being built from source.  The
only SML compiler suitable for bootstrapping MLton at the moment is
another (possibly older) version of MLton.  That MLton can be built
with an older version of itself eliminates the problem.  The situation
is not unlike that of gcc, which requires another (possibly older)
binary version of gcc to build.

> In the docs there is mentioned that one could build MLton with SML/NJ,
> but the Debian package smlnj seems to have the same problem. Maybe the
> solution of the similar problem with SML/NJ can solve this bug too.

It would be nice if other SML compilers could be used to bootstrap
MLton.  But, unfortunately it's not feasible.  Building MLton with
SML/NJ isn't too bad.  But using that version to bootstrap a
self-compiled version of MLton is not practical because the version of
MLton compiled by SML/NJ runs *much* more slowly than the version
compiled by MLton.  I assume the same would be true if someone went to
the (substantial) effort required to port MLton to other SML
compilers.

> This is possibly a serious bug, but I'm aware that Policy doesn't
> explicitly forbid Build-Depending on itself.

In my opinion, this is not a bug.  It is a (possible) consequence of
building a self-hosting compiler.  So, would you rather I close the
bug or change its severity to wishlist?  Or do you have other ideas?