qlot icon indicating copy to clipboard operation
qlot copied to clipboard

qlot doesn't pick up the right ASDF version

Open wojtyniak opened this issue 1 year ago • 7 comments

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

wojtyniak avatar May 28 '24 01:05 wojtyniak

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

fukamachi avatar May 28 '24 01:05 fukamachi

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.

fukamachi avatar May 28 '24 01:05 fukamachi

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 local directive, 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?

wojtyniak avatar May 28 '24 02:05 wojtyniak

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

braunse avatar May 31 '24 21:05 braunse

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.

fukamachi avatar Jun 01 '24 14:06 fukamachi

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

braunse avatar Jun 02 '24 11:06 braunse

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.

Screenshot 2024-06-11 at 22 40 13

fukamachi avatar Jun 11 '24 13:06 fukamachi

Since v1.6.0, Qlot allows the ASDF version to be set by qlot add asdf 3.3.7.1.

fukamachi avatar Nov 23 '24 13:11 fukamachi