minimakefile branch merged
Faré
fahree at gmail.com
Thu Nov 5 01:26:51 UTC 2015
TL;DR: the infrastructure to build asdf is now in Lisp;
no change to asdf itself.
Dear ASDF developers and power-users,
I've merged the minimakefile branch into master, with the blessing of Robert.
This branch replaces the Makefile and its attendant shell scripts with
a Lisp system asdf-tools plus shims to invoke it. It fixes a number of
release engineering bugs, in addition to making things generally
more robust, better documented and more portable (notably to Windows).
As in all big changes, there may be bugs lurking in untested cases.
If you use ASDF on anything but Linux/x64 or MacOS X, we'd appreciate it
if you ran the ASDF test suite:
make -C .../asdf l=clisp test
or
cd .../asdf ; ./make l=sbcl test
See the minimal Makefile for some documentation.
The implementations supported are the same as before and/or
as by the lisp-invocation library.
You can look at the work done with:
git diff 4a7c25c 8315d23
(use git diff --stat for a quick summary of which files changed).
More details than you care for below:
The minimakefile, which has been more than a year in the making and debugging,
replaces the Makefile and its attendant shell scripts (notably run-tests.sh)
with a system asdf-tools completely written in Lisp, plus small shims
to invoke it
from the shell (shell scripts and Windows .BAT files, and a minimized Makefile).
The branch fixes a number of release engineering bugs:
* Some cases of failure to fail during testing are fixed (e.g. test-load).
* When a test fail the instructions on how to reproduce it are correct
by construction, based on the same expressions used to run the test.
* When -no-stop tests are run, a summary of all failures is reported.
* Output visible during testing is minimal;
the copious dribble remains available in log files.
* Support for debian packaging is much improved.
* Building and testing on Windows doesn't require Unix tools anymore
(cygwin, etc.)
* ASDF should be more robust with respect to interference between
its ext/ dependencies and any other versions of the same libraries
in your CL_SOURCE_REGISTRY.
* The infrastructure is better documented.
* Probably several other minor bugs.
If you read the source code, you may (or then again not) enjoy
how we used Lisp to replace make and shell scripting.
Most of the code should be straightforward and somewhat documented.
It notably uses inferior-shell for invoking
shell pipes with suitable string interpolation.
And it also uses cl-scripting to manage a notion of failure context,
so it can report what failed when running a series of many tests;
this is an improvement over what make -k could do.
Actually a lot of the residual complexity in deftestcmd is due to the desire
to preserve the abitlity to invoke asdf-tools functions from the Makefile
as well as more directly by a shell script, or at the SLIME REPL.
This lead to implementing a triple calling convention.
Most programs would only care about the REPL,
or about the REPL and a shell script, not about crazy ways
to pass parameters through a Makefile via environment variables.
A lot of the bootstrap machinery (make.{sh,.bat}, asdf-tools{,.bat})
is unique to ASDF and its need to mostly not rely on libraries, and
(on Windows) not even on any of the Unix toolchain.
If you need to distribute a Lisp program in a similar setup,
you could copy and modify those scripts;
but more realistically, you should probably be using cl-launch instead
to produce the binaries you need from source.
The doc/Makefile hasn't been replaced with Lisp code yet, but
there's no reason it couldn't be — that would be a good exercise
for someone who wants to get familiar with this codebase (nudge, nudge).
To me, it's also a demonstration of how Lisp can be used to replace
shell-scripting, even in constrained situations that make bootstrap tricky.
http://fare.livejournal.com/184127.html
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Have the courage to take your own thoughts seriously, for they will shape you.
— Albert Einstein
More information about the asdf-devel
mailing list