asdf::system-defsystem-depends-on sometimes slot-unbound

Bug #1247662 reported by Robert P. Goldman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Undecided
Robert P. Goldman

Bug Description

Fare writes:

[In order to identify] defsystem-depends-on dependencies,
there's asdf::system-defsystem-depends-on
aka asdf/system:system-defsystem-depends-on in ASDF3.
Unhappily, the slot is sometimes unbound (e.g. for preloaded systems),
which is probably a bug, and you need to
test for (slot-boundp system 'asdf::defsystem-depends-on)
(exported from asdf/component — why isn't it in asdf/system?
That's probably another bug. That said, it shouldn't be "just fixed"
without running the upgrade test —
I believe a :recycle asdf/component is then needed in asdf/system.
At the very least, it should be flagged for fixing
in case there's ever a backward-incompatible ASDF4).

Revision history for this message
Faré (fahree) wrote :

This is still unfixed. Robert: before release 3.1.1, maybe we should add an :initform nil to the defsystem-depends-on slot definition in asdf/system.lisp ?

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Let me take a quick look at this before I say yea or nay -- I've been burned too many times by initforms. But I'm inclined to think this one is reasonable.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Does this only happen for preloaded systems? Do we have an example? I don't know how to replicate this bug.

Revision history for this message
Faré (fahree) wrote :

AFAICT, it's not a bug in the running code of ASDF, but a glitch in the exposed API: because the slot can be left unbound for regular systems as well as preloaded systems, users must check slot-boundp before they may use it.

Yes, it could be explicitly set for preloaded and regular systems alike, but it makes sense to have an :initform nil since that's a pretty good default indeed, and in practice also the default for regular systems.

(slot-boundp (asdf:find-system :alexandria) 'asdf::defsystem-depends-on)
;; => NIL

Revision history for this message
Faré (fahree) wrote :

NB: while you're at it, you might make Xach's life easier by separately and explicitly saving the :depends-on and :weakly-depends-on initialization arguments.

Revision history for this message
Faré (fahree) wrote :

It seems to me that rpgoldman fixed this bug in 3.1.0.68, with additional cleanup in 3.1.0.72. Marking as Fix Committed.

Changed in asdf:
assignee: nobody → Robert P. Goldman (rpgoldman)
milestone: none → version4
status: New → Fix Committed
Changed in asdf:
milestone: version4 → asdf3-1
Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.