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

preventing quicklisp bundle definition from reloading #1508

Open
bendyarm opened this issue Jul 2, 2023 · 1 comment
Open

preventing quicklisp bundle definition from reloading #1508

bendyarm opened this issue Jul 2, 2023 · 1 comment

Comments

@bendyarm
Copy link
Member

bendyarm commented Jul 2, 2023

As a specific example of issue #1507
this form from quicklisp/base.lisp

(include-raw "bundle/bundle.lisp" :host-readtable t)

when reloaded, resets the asdf:already-loaded-systems info,
losing knowledge of which systems were previously loaded,
even though those systems remain in the environment.

So even if you load the asdf system with (asdf:require-system ..)
instead of (asdf:load-system ..) to prevent reloading,
if this include-raw is reloaded then the require-system
would think it needs to load.

Usually this would not cause any problem since system loading
is generally idempotent, but it is suboptimal.

I will submit a PR for this issue that specifically prevents
the bundle definition from reloading.

If anyone can think of a scenario where you would want
the bundle info to reload in an ACL2 environment,
please comment.

@bendyarm
Copy link
Member Author

bendyarm commented Jul 4, 2023

Here's a transcript that demonstrates the bug.

; 1. Load a quicklisp system and then undo.
ACL2 !>(include-book "quicklisp/zippy" :dir :system)
ACL2 !>:u
ACL2 !>:q
* (asdf:already-loaded-systems)
("asdf" "uiop" "asdf-package-system" "zippy" "documentation-utils" ...)
; Note that the :u did not remove the raw loaded asdf "zippy".
* (lp)

; 2. Now load the main quicklisp loader book.
ACL2 !>(include-book "quicklisp/base" :dir :system)
ACL2 !>:q
* (asdf:already-loaded-systems)
("asdf" "uiop" "asdf-package-system")
; ^^ that return value is a bug. ^^
; The raw loaded asdf "zippy" is in the environment but the asdf info was reset.
; E.g.:
* (find-package "ZIPPY")
#<PACKAGE "ZIPPY">

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

1 participant