Question on compile-system vs. load-system
While maintaining more than 650 Common Lisp packages for Guix, I've seen only two packages fail with the current build system which uses asdf:compile-system
.
- https://github.com/Shirakumo/cl-gamepad/issues/8
- https://github.com/s-expressionists/Cleavir (More specifically the cleavir-abstract-interpreter)
To be more concrete, here is a recipe to reproduce the problem (works without Guix too):
- 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)
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.
If I replace asdf:compile-system
with asdf:load-system
, it works like a charm.
I'd like to understand what's going on.
In the above, STRATEGY
is defined in strategy.lisp
which is gets compiled before that as part of the system. So why does it fail?
Any idea?