Updating to ASDF 3.x in CLISP
Asked Answered
I

4

6

I am trying to update ASDF in CLISP 2.49 (on Mac OS Sierra) to version 3.x. I have now version 2.26 of ASDF. I have tried everything I found online: I downloaded the latest version of ASDF as indicated in https://common-lisp.net/project/asdf/ but then when I eval (require "asdf"), as indicated in the manual (https://common-lisp.net/project/asdf/asdf.html#Upgrading-ASDF) nothing happens, I still have version 2.26. The manual also tells to load the file asdf.lisp, but the file is missing from the new version folder. I discovered that quicklisp had its own version of asdf.lisp and asdf.fas, which seem to be the ones being loaded, but I don't see how to replace them with any new version. I have tried so many things now that I'm afraid I'm screwing the system up.

Does anyone know how to upgrade ASDF to a version >= 3.0 reliably and step by step? Thanks a lot.

Infiltration answered 11/7, 2017 at 19:38 Comment(4)
How did you install CLISP?Battleax
I used home-brew: brew install clispInfiltration
I think homebrew does not distribute asdf with clisp.Battleax
It could be. I don't remember if it came with it or whether I installed it apart. The fact is that I have version 2.26 and I'm stuck with it.Infiltration
S
8

1- To generate asdf.lisp from source, type make in the asdf git checkout.

2- (load (compile-file ...)) will recompile it every time. You probably want to only compile it once, then overwrite whichever fasl is usually used with it.

3- If you get asdf from quicklisp, as I suppose you do, just replace its obsolete ~/quicklisp/asdf.lisp 2.26 by your asdf.lisp 3.2.1, then blow away the cache in ~/quicklisp/cache/

4- Please complain to Xach about upgrading its asdf to 3.1.7 or 3.2.1. Quicklisp is doing lispers a disservice by distributing 2.26.

Stalinist answered 14/7, 2017 at 3:45 Comment(0)
B
4

Basically, all you need to do is replace 2.6 with 3.2.

Find out where asdf.lisp 2.6 resides.

You can do (load "asdf") or (require "asdf") and see where it is being loaded from. Let the path be my/asdf/directory/asdf.lisp.

Replace the file.

wget https://common-lisp.net/project/asdf/archives/asdf.lisp -O my/asdf/directory/asdf.lisp

Compile the new asdf

clisp -norc -c my/asdf/directory/asdf.lisp
Battleax answered 12/7, 2017 at 20:45 Comment(0)
I
3

OK, I finally got it, it was a combination of the two answers above. First, I don't have wget in my system, but I downloaded the file https://common-lisp.net/project/asdf/archives/asdf.lisp manually and saved it in the right path. Then added the two lines

(load #P"~/quicklisp/setup.lisp")        ; will load asdf 2.26
(load (compile-file #P"~/rc/asdf.lisp")) ; will load asdf 3 over asdf 2.26.

to the file ~/.clisprc.lisp Now, after restarting CLISP I finally get:

(asdf:asdf-version)
"3.2.1"

Thanks a lot Sam and Pascal for your help!

Infiltration answered 12/7, 2017 at 21:23 Comment(1)
you are loading asdf twice, first 2.26, then 3. this is wasteful.Battleax
D
2

asdf itself is self-updatable. You only have to load the latest version.

http://paste.lisp.org/display/350703

So basically, you download an asdf 3 somewhere, say ~/rc/asdf.lisp and in your ~/.clisprc.lisp you put:

(load #P"~/quicklisp/setup.lisp")        ; will load asdf 2.26
(load (compile-file #P"~/rc/asdf.lisp")) ; will load asdf 3 over asdf 2.26.
Dekko answered 12/7, 2017 at 19:3 Comment(2)
The problem with this is that the latest version of asdf does not contain a file called asdf.lisp. I have downloaded it with: git clone gitlab.common-lisp.net/asdf/asdf.git and it creates a new folder with some 50 files, but not the one you require.Infiltration
@Leo, it's in "asdf/build/asdf.lisp"Midge

© 2022 - 2024 — McMap. All rights reserved.