[Clc-users] Re-loading of ASDF-based system where file, that contains defpackage form, is modified

Joubert Nel joubert at joubster.com
Thu Dec 27 00:36:29 UTC 2007


Hi,

I have found a case where SBCL, when loading a set of files via ASDF
(and with Common-Lisp-Controller doing its magic), errors if the file
that contains a defpackage form, is modified inbetween successive
(require) invocations.

I am not sure whether this is expected behavior, but I doubt it.
Moreover, I'm not certain whether this would be an ASDF error or an SBCL
one (my gut says the former), or even a Common Lisp Controller
interference with ASDF.

Steps to reproduce:
1) Create 3 files; one .asd, one package.lisp, and another .lisp file
(let's call this functions.lisp)
2) The defsystem specifies as components the package.lisp and
functions.lisp files
3) The package.lisp file includes a defpackage form while the
functions.lisp file contains a single defun.
4) Now do a (require) on the system - all is OK.
5) Repeat (require) on the system - all is OK.
6) Now edit the package.lisp file (e.g. add a (format) form) and save.
7) When you now (require) the system, an error condition,
ASDF:COMPILE-FAILED occurs. I attach the backtrace (condition.txt)
information.

The only workaround is to evaluate a (delete-package) form after you
change the package.lisp, but before you do another (require).

Attached are 3 files that demonstrate this problem.
1) (require :pak)
2) Edit the package.lisp and save
3) (require :pak) --> boom!

Platform:
SBCL 1.0.11.debian (on Ubuntu).
Common Lisp Controller 6.12
CL-Asdf 1.109-2

Any ideas?

Joubert


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pak.asd
Type: text/lisp-sysdef
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/clc-users/attachments/20071226/3b4afd69/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: package.lisp
Type: text/lisp-source
Size: 123 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/clc-users/attachments/20071226/3b4afd69/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: functions.lisp
Type: text/lisp-source
Size: 130 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/clc-users/attachments/20071226/3b4afd69/attachment-0002.bin 
-------------- next part --------------
erred while invoking #<COMPILE-OP NIL {AE191E1}> on
#<CL-SOURCE-FILE "package" {B065A49}>
   [Condition of type ASDF:COMPILE-FAILED]

Restarts:
 0: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL {AE191E1}> on #<ASDF:CL-SOURCE-FILE "package" {B065A49}>.
 1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {AE191E1}> on #<ASDF:CL-SOURCE-FILE "package" {B065A49}> as having been successful.
 2: [ABORT] Return to SLIME's top level.
 3: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {B436311}>)

Backtrace:
  0: ((SB-PCL::FAST-METHOD ASDF:PERFORM
       (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE))
      #<unavailable argument>
      #<unavailable argument>
      #<ASDF:COMPILE-OP NIL {AE191E1}>
      #<ASDF:CL-SOURCE-FILE "package" {B065A49}>)
      Locals:
        SB-DEBUG::ARG-0 = :<NOT-AVAILABLE>
        SB-DEBUG::ARG-1 = :<NOT-AVAILABLE>
        SB-DEBUG::ARG-2 = #<ASDF:COMPILE-OP NIL {AE191E1}>
        SB-DEBUG::ARG-3 = #<ASDF:CL-SOURCE-FILE "package" {B065A49}>
  1: ((LAMBDA
          (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
           SB-PCL::.ARG1.))
      #<unavailable argument>
      #<unavailable argument>
      #<ASDF:COMPILE-OP NIL {AE191E1}>
      #<ASDF:CL-SOURCE-FILE "package" {B065A49}>)
  2: ((LAMBDA ()))
      [No Locals]
  3: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))
      [No Locals]
  4: (SB-UNIX::CALL-WITH-LOCAL-INTERRUPTS
      #<CLOSURE (FLET SB-UNIX::WITH-LOCAL-INTERRUPTS-THUNK) {B645281D}>
      T)
      Locals:
        SB-DEBUG::ARG-0 = #<CLOSURE (FLET SB-UNIX::WITH-LOCAL-INTERRUPTS-THUNK) {B645281D}>
        SB-DEBUG::ARG-1 = T
  5: ((FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK) T)
  6: ((FLET SB-UNIX::RUN-WITHOUT-INTERRUPTS))
  7: (SB-UNIX::CALL-WITHOUT-INTERRUPTS
      #<CLOSURE (FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK) {B645290D}>)
  8: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK
      #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK) {B645298D}>
      #S(SB-THREAD:MUTEX
         :NAME "big compiler lock"
         :%OWNER #<SB-THREAD:THREAD "repl-thread" {B436311}>
         :STATE 1))
  9: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA #) {AE247FD}>)
 10: (ASDF:OPERATE ASDF:LOAD-OP :PAK)
 11: (ASDF::MODULE-PROVIDE-ASDF :PAK)
 12: ((LAMBDA (#:G[REQUIRE]18)) ASDF::MODULE-PROVIDE-ASDF)
 13: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1
      #<CLOSURE (LAMBDA #) {ADC5D8D}>
      (ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB))
 14: (REQUIRE :PAK NIL)
 15: (SB-INT:SIMPLE-EVAL-IN-LEXENV (REQUIRE :PAK) #<NULL-LEXENV>)
 16: (SWANK::EVAL-REGION
      "(require :pak)
     ")
 17: ((LAMBDA ()))
 18: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {ADC5995}>)
 19: ((LAMBDA (SWANK-BACKEND::FN)) #<CLOSURE (LAMBDA #) {ADC597D}>)
 20: (SWANK::CALL-WITH-BUFFER-SYNTAX #<CLOSURE (LAMBDA #) {ADC597D}>)
 21: (SWANK::REPL-EVAL
      "(require :pak)
     ")
 22: (SB-INT:SIMPLE-EVAL-IN-LEXENV
      (SWANK:LISTENER-EVAL "(require :pak)
     ")
      #<NULL-LEXENV>)
 23: ((LAMBDA ()))
 24: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN))
      #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
      #<CLOSURE (LAMBDA #) {ADC584D}>)
 25: ((LAMBDA ()))
 26: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN))
      #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
      #<FUNCTION (LAMBDA #) {B9FF66D}>)
 27: (SWANK::CALL-WITH-REDIRECTED-IO
      #<SWANK::CONNECTION {B31DE89}>
      #<CLOSURE (LAMBDA #) {ADC5795}>)
 28: (SWANK::CALL-WITH-CONNECTION
      #<SWANK::CONNECTION {B31DE89}>
      #<FUNCTION (LAMBDA #) {B9FF66D}>)
 29: (SWANK::HANDLE-REQUEST #<SWANK::CONNECTION {B31DE89}>)
 30: (SWANK::REPL-LOOP #<SWANK::CONNECTION {B31DE89}>)
 31: (SWANK::REPL-LOOP #<SWANK::CONNECTION {B31DE89}>)
 32: (SWANK::CALL-WITH-BINDINGS NIL #<CLOSURE (LAMBDA #) {B4450A5}>)
 33: ((FLET SB-THREAD::WITH-MUTEX-THUNK))
 34: (SB-UNIX::CALL-WITH-LOCAL-INTERRUPTS
      #<CLOSURE (FLET SB-UNIX::WITH-LOCAL-INTERRUPTS-THUNK) {B645309D}>
      T)
 35: ((FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK) T)
 36: ((FLET SB-UNIX::RUN-WITHOUT-INTERRUPTS))
 37: (SB-UNIX::CALL-WITHOUT-INTERRUPTS
      #<CLOSURE (FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK) {B645318D}>)
 38: (SB-THREAD::CALL-WITH-MUTEX
      #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK) {B6453215}>
      #S(SB-THREAD:MUTEX
         :NAME "thread result lock"
         :%OWNER #<SB-THREAD:THREAD "repl-thread" {B436311}>
         :STATE 1)
      #<SB-THREAD:THREAD "repl-thread" {B436311}>
      T)
 39: ((LAMBDA ()))
 40: ("foreign function: #x806398C")
 41: ("foreign function: #x8051E61")
 42: ("foreign function: #x805B44D")
 43: ("foreign function: #xB7FB84FB")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/clc-users/attachments/20071226/3b4afd69/attachment.pgp 


More information about the Clc-users mailing list