qlot doesn't pick up the right ASDF version
Describe the bug
I have new asdf version in ~/common-lisp/asdf, qlot seems to notice it, but doesn't load it:
$ rlwrap qlot exec sbcl
WARNING:
ASDF 3.3.7 (from /Users/xx/common-lisp/asdf/asdf.asd), UIOP 3.3.6 (from /Users/xx/.qlot/qlot/.bundle-libs/software/uiop-3.3.6/uiop.asd)
This is SBCL 2.4.4, 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.
* (asdf:asdf-version)
"3.3.1"
*
Meanwhile w/o qlot:
$ sbcl --non-interactive --eval '(print (asdf:asdf-version))'
(...)
"3.3.7" %
Can I somehow specify force it to use newer ASDF? I have a use case where I cannot use rosewell and one of the packages I'm trying to use requires newer ASDF than the one shipped with sbcl.
I'm sorry if this doesn't qualify as a bug in the first place, I'm new to the Common Lisp.
Reproducible steps
brew install sbcl
mkdir ~/common-lisp
( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.7.tar.gz && tar -xvf asdf-3.3.7.tar.gz && mv asdf-3.3.7 asdf )
curl -L https://qlot.tech/installer | sh
mkdir -p ~/common-lisp/local-projects/foo ; cd ~/common-lisp/local-projects/foo ; qlot init ; qlot install
qlot exec sbcl --non-interactive --eval '(print (asdf:asdf-version))'
Expected behavior
qlot uses the ASDF from ~/common-lisp/asdf
Versions:
- Qlot version: 1.5.3 via Automatic Installer
- OS: Macos 14
- Lisp: sbcl 2.4.4
Interesting question.
The behavior is intended because Qlot removes influences from the local environments. Qlot loads a bundled version of ASDF in the project-local Quicklisp.
If you'd like Qlot to use a newer one, add the ASDF directory to ./.qlot/local-projects.
$ ln -s ~/common-lisp/asdf .qlot/local-projects
It's worth trying it to see if it's possible to specify in qlfile to allow all members to use the same version of ASDF for the project.
It's possible to include the newer one in the project repository and load it by using local directive, though.
The behavior is intended because Qlot removes influences from the local environments. Qlot loads a bundled version of ASDF in the project-local Quicklisp.
Interesting. The only asdf.lisp I see is the foo/.qlot/asdf.lisp and it's a different version
$ head asdf.lisp
;;; -*- mode: Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
;;; This is ASDF 3.2.1: Another System Definition Facility.
$ ln -s ~/common-lisp/asdf .qlot/local-projects
This worked! Thank you!
It's possible to include the newer one in the project repository and load it by using
localdirective, though.
It seems that the local directive expects absolute paths, though, which requires users to share the same folder structure. Am I missing here something?
Even when providing an absolute pathname, I can't seem to reference ASDF from the qlfile:
Qlfile:
local asdf <project>/vendor/asdf
Result:
$ qlot install
Reading '/home/seb/dev/qlot-asdf-version/qlfile'...
✓ [1/1] quicklisp No update on dist "quicklisp" version "2023-10-21".
Adding "asdf" located at '<project>/vendor/asdf'.
Unexpected error: Error while executing a shell command: "<home>/bin/ros" "+Q" "-e" "(require 'asdf)" "-e" "(setf *debugger-hook* (lambda (c parent) (declare (ignore parent)) (princ c *error-output*) (fresh-line *error-output*) (uio)
Package EXT does not exist. Line: 9, Column: 28, File-Position: 312 Stream: #<SB-SYS:FD-STREAM for "file <project>/vendor/asdf/test/ecl-make-image/hellow.asd" {10013DE783}>
This can be a bug of Qlot.
Report it at https://github.com/fukamachi/qlot/issues/new/choose.
Please attach the stack trace dumped to '/tmp/qlot-error-JAIDFZTL.log'.
Trace: trace.log
I can reproduce it on my machine.
The error says that Qlot failed to read an ASDF file for ECL. This is because Qlot looks for all ASD files in the project recursively and tries to read them to determine their dependencies.
It can be avoided by just ignoring them if failed, though I still wonder if it's okay for all cases. I'm on it anyway.
FYI, it does not just happen for ASD files in my project, but also when I try to pull in ASDF from git.
Qlfile:
git asdf https://gitlab.common-lisp.net/asdf/asdf.git :tag 3.3.7.1
Result:
$ qlot install
Installing Quicklisp to /home/seb/dev/qlot-asdf-version/.qlot/...
Reading '/home/seb/dev/qlot-asdf-version/qlfile'...
✓ [1/2] quicklisp Newly installed "quicklisp" version "2023-10-21".
⨯ [2/2] asdf Failed to install
Unexpected error: Package EXT does not exist.
Stream: #<SB-SYS:FD-STREAM for "file /tmp/qlot-5O2SOX49/asdf-ref-44a3d6822a96e4f110259e4beb321621efe72679/test/ecl-make-image/hellow.asd" {10052BEC33}>
This can be a bug of Qlot.
Report it at https://github.com/fukamachi/qlot/issues/new/choose.
Please attach the stack trace dumped to '/tmp/qlot-error-9BN22RMA.log'.
Trace: trace.log
I made changes to Qlot to support relative paths for local directives.
Now, it allows you to load a different version of ASDF, though it's not the best.
Since v1.6.0, Qlot allows the ASDF version to be set by qlot add asdf 3.3.7.1.