GNU bug report logs -
#56334
Should asdf-build-system/sbcl use load-system instead of compile-system?
Previous Next
Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>
Date: Fri, 1 Jul 2022 10:18:01 UTC
Severity: normal
Done: Guillaume Le Vaillant <glv <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 03 Aug 2022 14:49:18 +0000
with message-id <875yj974v2.fsf <at> kitej>
and subject line Re: Should asdf-build-system/sbcl use load-system instead of compile-system?
has caused the debbugs.gnu.org bug report #56334,
regarding Should asdf-build-system/sbcl use load-system instead of compile-system?
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
56334: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56334
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
While trying to package
https://github.com/s-expressionists/Cleavir
I hit a strange issue in which it would fail to compile, while calling
`asdf:load-system' locally worked.
Then I realized that our asdf-build-system/sbcl uses
`asdf:compile-system' instead of `asdf:load-system'.
From the ASDF doc:
--8<---------------cut here---------------start------------->8---
This will make sure all the files in the system are compiled, but not
necessarily load any of them in the current image; on most systems, it
will _not_ load all compiled files in the current image. This function
exists for symmetry with 'load-system' but is not recommended unless you
are writing build scripts and know what you're doing.
--8<---------------cut here---------------end--------------->8---
So should we really use it?
By the way this _may_ be related to the issue we've got with loading the
tests of some packages, like sbcl-jonathan:
--8<---------------cut here---------------start------------->8---
;; Tests fail with: Component JONATHAN-ASD::JONATHAN-TEST not found,
;; required by #<SYSTEM "jonathan">. Why?
--8<---------------cut here---------------end--------------->8---
Recipe to reproduce:
- git clone https://github.com/s-expressionists/Cleavir
- cd Cleavir
- guix shell sbcl sbcl-acclimation sbcl-concrete-syntax-tree sbcl-closer-mop -- sbcl
- (asdf:initialize-source-registry `(:source-registry (:tree ,(uiop:getcwd)) :inherit-configuration))
- (asdf:compile-system :cleavir-abstract-interpreter)
--8<---------------cut here---------------start------------->8---
debugger invoked on a SB-PCL:CLASS-NOT-FOUND-ERROR in thread
#<THREAD "main thread" RUNNING {100B598173}>:
There is no class named CLEAVIR-ABSTRACT-INTERPRETER:STRATEGY.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [TRY-RECOMPILING ] Recompile control and try loading it again
1: [RETRY ] Retry
loading FASL for #<CL-SOURCE-FILE "cleavir-abstract-interpreter" "control">.
2: [ACCEPT ] Continue, treating
loading FASL for #<CL-SOURCE-FILE "cleavir-abstract-interpreter" "control">
as having been successful.
3: Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
5: Retry ASDF operation.
6: Retry ASDF operation after resetting the
configuration.
7: [ABORT ] Exit debugger, returning to top level.
--8<---------------cut here---------------end--------------->8---
And then
- (asdf:load-system :cleavir-abstract-interpreter)
works like a charm!
Thoughts?
Pierre
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (text/plain, inline)]
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:
> I'll be the road for a while, unable to work on this patch, so if anyone
> wants to work on it and merge, please go ahead :)
>
> Left to do:
>
> - Suggestion: add a keyword to choose between asdf:compile-system and
> asdf:load-system (default should be asdf:load-system).
> - Make sure sbcl-stumpwm-kbd-layouts usees asdf:compile-system.
> - Rebuild the Lisp world to test.
I added a 'asd-operation' keyword parameter with a default value of
"load-system", and I used it in the package definition of
sbcl-stumpwm-kbd-layouts to use "compile-system" instead.
Patches pushed as 6b5ef03a2582ab23228478018fd356e17db1daea and
following.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.