Documented way of upgrading ASDF using (require "asdf") doesn't work
Hi all,
With latest master checked out to ~/code/common-lisp/asdf, when I do this:
$ CL_SOURCE_REGISTRY=$HOME/code/common-lisp/asdf sbcl
This is SBCL 2.3.9.nixos, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (require "asdf")
NIL
* asdf::*asdf-version*
"3.3.1"
* (asdf:load-system "asdf")
; compiling file "/Users/user/code/common-lisp/asdf/build/asdf.lisp" (written 17 OCT 2023 03:06:55 PM):
; wrote /Users/user/.cache/common-lisp/sbcl-2.3.9.nixos-macosx-arm64/Users/user/code/common-lisp/asdf/build/asdf-tmpAAURSO1.fasl
; compilation finished in 0:00:01.994
T
* asdf::*asdf-version*
"3.3.6.1"
*
It's good that it loads the new ASDF explicitly at least on (asdf:load-system "asdf")
, but shouldn't it just load it straight away on the first (require "asdf")
?
The documentation states:
3.3 Upgrading ASDF
If your implementation already provides ASDF 3 or later (and it should), but you want a more recent ASDF version than your implementation provides, then you just need to ensure the more recent ASDF is installed in a configured path, like any other system. We recommend you download an official tarball or checkout a release from git into ~/common-lisp/asdf/. (see Configuring ASDF to find your systems).
Once the source code for ASDF is installed, you don’t need any extra step to load it beyond the usual (require "asdf"): ASDF 3 will automatically look whether an updated version of itself is available amongst the regularly configured systems, before it compiles anything else.
If your implementation fails to provide ASDF 3 or later, see Replacing your implementation’s ASDF.
Should that be changed to instructing (require "asdf") (asdf:load-system "asdf")
?