Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qlot finds strange versions of itself #269

Open
fosskers opened this issue Aug 24, 2024 · 6 comments
Open

Qlot finds strange versions of itself #269

fosskers opened this issue Aug 24, 2024 · 6 comments

Comments

@fosskers
Copy link
Contributor

fosskers commented Aug 24, 2024

Describe the bug

I was trying to load the :ultralisp system so that I could develop it. Note that Ultralisp depends on the qlot system as a dependency, but when I tried to load, it was complaining that with-local-quicklisp was missing (Ultralisp uses it). You recently readded it, and yet it still couldn't find it. The copy of qlot in the project's local .qlot/ was also correct.

I then checked (asdf:find-system :qlot) and discovered it was loading my local clone of qlot, found at ~/code/common-lisp/qlot/. Note: this path is not in my asdf:*central-registry* list. I then looked at .qlot/source-registry.conf and found this:

(:source-registry
 :ignore-inherited-configuration
 (:also-exclude ".qlot")
 (:also-exclude ".bundle-libs")
 (:directory #P"/home/colin/code/common-lisp/qlot/"))

I compared this to the same file in another project (transducers) and found it referencing /usr/lib/qlot/ instead, which matches my official installation of the qlot package. So, as an experiment I deleted that .qlot/ as well as my local clone of qlot and reran qlot install in transducers/. Now I see:

(:source-registry
 :ignore-inherited-configuration
 (:also-exclude ".qlot")
 (:also-exclude ".bundle-libs")
 (:directory #P"/home/colin/code/common-lisp/ultralisp/.qlot/dists/ultralisp/software/fukamachi-qlot-20240814155119/"))

^^^ It found a version of itself in a very strange place! My conclusion is that Qlot appears to be searching for itself (its systems?) whereever it can find them, including in locations that ASDF doesn't normally look. And also that it searches in /home/user/... before it looks in global places like /usr/lib/.

I don't know why Qlot needs to "find itself" like this, but either way, I'd expect it to prioritize the /usr/lib/ variant. At least when qlot is being used as a dependency in a project, it should prioritize the version found in .qlot/.

Reproducible steps

  1. Have copies of qlot systems in various locations on your filesystem.
  2. Initialize a project with qlot init / qlot install.
  3. Observe it finding a strange version of qlot in source-registry.conf.
  4. Delete that copy of qlot, the original .qlot/ you made, and rerun qlot install.
  5. Observe a different version of qlot detected.

Error messages

No specific errors.

Versions:

  • Qlot version: 1.5.9
  • Where did you get it from: AUR
  • OS: Arch Linux
  • Lisp: SBCL 2.4.6
@fukamachi
Copy link
Owner

fukamachi commented Aug 24, 2024

The searching logic is in ASDF bundled with SBCL, so there's nothing Qlot can do about it.
I personally don't use ~/common-lisp because of the problem.

This section will help you to solve it.
https://github.com/fukamachi/qlot?tab=readme-ov-file#asdf-configuration-to-prevent-from-loading-by-mistake

@fukamachi
Copy link
Owner

Can you paste the content of qlot script? (such as /usr/local/bin/qlot)

@fosskers
Copy link
Contributor Author

fosskers commented Aug 24, 2024

#!/bin/sh
exec /usr/lib/qlot/scripts/run.sh "$@"

which leads to https://github.com/fukamachi/qlot/blob/master/scripts/run.sh

Thanks, I will try the other configuration option. Or I'll hand-configure that :directory field if I notice it's the wrong value.

@fosskers
Copy link
Contributor Author

fosskers commented Aug 24, 2024

If I add

(push ".qlot" asdf::*default-source-registry-exclusions*)
(asdf:initialize-source-registry)

to my SBCL config and run sbcl, I'm told:

Package ASDF does not exist.

and a condition is raised.

@fukamachi
Copy link
Owner

You must add (require 'asdf) in case you haven't loaded ASDF or Quicklisp before.

@fukamachi
Copy link
Owner

It seems the loaded Qlot will be overwritten by another Qlot in ~/common-lisp (or in other user space) by ASDF in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants