allow for undefined component-class when disabled by :if-feature

Bug #1445636 reported by Faré
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
New
Undecided
Unassigned

Bug Description

I tried to use the following components:
  (sb-grovel:grovel-constants-file "sbcl/constants"
      :package :com.dvlsoft.clon :if-feature :sbcl)
  (:grovel-file "cffi/constants" :if-feature (:or :allegro :clisp :lispworks))
  (:file "termio")

But
(1) the first one doesn't work without a #+sbcl, because the package and class aren't present outside of asdf. The result would be the same putting the class name in a string, except that this doesn't look like it's even working at all.

(2) the second one doesn't work if I conditionally system-depends-on (or allegro clisp lispworks), for then asdf still tries to instantiate a class, and fails.

(3) if you try to use (:feature :sbcl (:require "sb-grovel")) and/or (:feature (:or :allegro :clisp :lispworks) "cffi-grovel")) in your :system-depends-on, load-systems* will bork when trying to load them and they are expanded to NIL instead of a valid system name, unless once again you use #+ to protect the form, which defeats the goal of avoiding #+.

FEATURE REQUEST:
* have some kind of "invalid-component" class that ASDF uses in such cases, whereby no error happens if :if-feature causes asdf to avoid the component, but error happens if you actually try to depend on the component without it being nulled out by :if-feature.
* suitably expand missing classes into said invalid-component.
* an invalid component has a message slot to explain where the missing component comes from.
* remove nil's before to call load-systems* and/or inside load-systems*

(Issues found while trying to cleanup the build of Didier Verna's clon.)

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

Point 3 and its solution are now https://bugs.launchpad.net/asdf/+bug/1445638

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.