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 does not install dependencies? #221

Closed
gwerbin opened this issue Jan 3, 2024 · 8 comments
Closed

Qlot does not install dependencies? #221

gwerbin opened this issue Jan 3, 2024 · 8 comments

Comments

@gwerbin
Copy link

gwerbin commented Jan 3, 2024

Describe the bug

Qlot does not install dependencies of dists specified in qlfile. Am I doing something wrong?

Reproducible steps

mkdir -p ~/tmp/qlot-test
cd ~/tmp/qlot-test

qlot init
echo 'ql cl-str' >> qlfile
qlot install
Reading '/home/mg/tmp/qltest/qlfile'...
Already have dist "quicklisp" version "2023-10-21".
Already have dist "cl-str" version "ql-2023-10-21".
Ensuring 0 dependencies installed.                 
Successfully installed.           

I expected cl-ppcre, cl-unicode, etc. to be included here as well, because they are dependencies of cl-str: https://github.com/vindarel/cl-str/blob/cfda1071b5ec5dc5513a45de0d976bbf96326ca4/str.asd#L12-L14

Error messages

qlot exec ccl --eval '(asdf:load-system :str)'
> Error: Error Component :CL-PPCRE not found, required by #<SYSTEM "str">
> While executing: ASDF/FIND-COMPONENT:RESOLVE-DEPENDENCY-NAME, in process listener(1).

None

Versions:

  • Qlot version: 1.3.5
  • Where did you get it from: Arch Linux package repo
  • OS: Endeavour OS
  • Lisp: SBCL 2.4.0 and Clozure CL 1.12.2
@fukamachi
Copy link
Owner

Qlot installs dependencies of the project, not all dependencies of libraries in qlfile.
Nothing will be installed if there are no ASD files in the directory.
Add an ASD file containing a system that depends on cl-str if it’s what you want.
Or, use ql:quickload instead of asdf:load-system.

@gwerbin
Copy link
Author

gwerbin commented Jan 3, 2024

Thanks for clarifying, I'll try that.

In that case, what is the purpose of the qlfile if it's just looking at the system definition?

@fukamachi
Copy link
Owner

Good question.
The qlfile is for managing sources to download dependencies for the local Quicklisp.
In that case, the cl-str of the current version is specified individually. That won’t be changed if you upgrade others.
See qlfile.lock for all sources and those versions.

@gwerbin
Copy link
Author

gwerbin commented Jan 7, 2024

It sounds like qlot install does two things:

  1. Look for system definitions in the current directory and install those systems + their dependencies
  2. Ensure that the installed versions of the systems match whatever is specified in qlfile.lock.

Is that right?

In that case, the qlfile is used to determine which systems should be "locked" in qlfile.lock?

@fukamachi
Copy link
Owner

Yes, correct.
I checked that Qlot installs all dependencies recursively with a system like:

;; myapp.asd
(defsystem "myapp"
  :depends-on ("str"))

@gwerbin
Copy link
Author

gwerbin commented Jan 10, 2024

Thanks for clarifying, and thanks for working on this tool. I have been using it for the "local Quicklisp" feature but never understood the qlfile until now.

As a feature request, I think it would be useful to provide an option to "lock" all transitive dependencies automatically, with or without a qlfile, using the qlfile only to require a specific version if desired. This is more like how "lockfiles" work in other languages, e.g. Ruby Gem and NodeJS.

@fukamachi
Copy link
Owner

Thank you for reaching out and giving Qlot a try!

As Qlot adds a Quicklisp dist to qlfile.lock implicitly, all dependencies will be locked with it like other languages.

For example, the following qlfile.lock shows that Quicklisp uses the 2023-06-18 dist while cl-str uses the 2023-10-21 version.

("quicklisp" .
 (:class qlot/source/dist:source-dist
  :initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
  :version "2023-06-18"))
("cl-str" .
 (:class qlot/source/ql:source-ql
  :initargs (:%version :latest)
  :version "ql-2023-10-21"))

@fosskers
Copy link
Contributor

I'm glad I found this issue, I had been wondering about transitive dependencies. This clarifies it well, thank you.

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

3 participants