Fix defsystem to accept strings as operation designators

Bug #1293292 reported by Faré
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Wishlist
Faré

Bug Description

In a bug reminiscent of the situation with component classes before ASDF 2.016, it is not possible to designate operation classes before their package exists, making defsystem-depends-on ineffective as a way to declaratively enable new operation classes. This matters more now that ASDF 3 makes defining new operation classes more useful, by allowing operations to better control their propagation.

My build-op branch on the git repository, currently at commit 5430fe44f095d1cd159a4a4d91d54ec31cad7878 implements these changes.

This branch also renames the completely unused build-system simply to build, in a bid to make it more usable. This is a separable issue, if the rename is disputed. The alternate name make was suggested. (As for a shorthand to load-system, aload was suggested, but that's again a different issue.)

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

Question: can we use strings that name *package-qualified* operations and component classes?

If we do this, we get out of the current trap, which essentially forces the authors of ASDF extensions to push their extensions into the ASDF package, opening the door to name collisions.

If one could write something like this, the problem might be eased...

:in-order-to ((doc-op "DECLT-ASDF:DECLT-OP"))

Revision history for this message
Faré (fahree) wrote :
Changed in asdf:
assignee: nobody → Robert P. Goldman (rpgoldman)
importance: Undecided → Wishlist
milestone: none → version4
status: New → Confirmed
Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Those discussion threads are all about using BUILD-OP. I just looked, and none of them discuss using strings instead of symbols as operation names.

These all discuss the need/not need of BUILD-OP.

The big question, then, remains: do we get "::" in our string-based operation names? If so, I think this could be really useful. If not, I'm not sure what we win.

So we would resolve these names *after* loading the defsystem-depends-on right?

Thanks!

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

Yes, I don't think there was any controversy about the ability to designate operation classes with keywords and strings. It complements the ability to do as well for component classes, which we already had to make defsystem-depends-on useful.

Before ASDF3, we didn't support new user-visible operations very well if at all. Now that such operations become more useful and potentially important, it's a good idea to support them better.

So yes, with this branch, you can name operations with "foo::foo-op" as well as :foo (if to be defined in package asdf or in *package*). This is symmetrical with same support for component classes (and actually is factored through the same function). And yes, such names are parsed at the last minute, therefore, after the defsystem-depends-on dependencies had a chance to be loaded — that's the whole point.

I don't think anyone opposed the existence of build-op, or a better name for build-system. The big question was about whether or not it should be advertised as the new "main interface" to ASDF. I believe we all agree now that this is a premature move.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote : Re: [Bug 1293292] Re: Fix defsystem to accept strings as operation designators

Faré wrote:
> So yes, with this branch, you can name operations with "foo::foo-op" as
> well as :foo (if to be defined in package asdf or in *package*). This is
> symmetrical with same support for component classes (and actually is
> factored through the same function). And yes, such names are parsed at
> the last minute, therefore, after the defsystem-depends-on dependencies
> had a chance to be loaded — that's the whole point.

Quick follow-up: do we have a test case for this? If not, I could write
one.

It would be nice to know that we can forward reference symbols in
as-yet-undefined ASDF extensions.

I particularly like it that this would mean that programmers don't have
to jam all their extensions into ASDF/INTERFACE, potentially causing
collisions.

Best,
r

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

Yes, my branch includes a new file test/test-defsystem-depends-on.script

Also, I had to preserve keyword:foo -> *package*:foo, because at least ironclad depends on it, but I think it should be deprecated.

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

Committed in 3.1.0.104.

NB: build-system was renamed to make.

Changed in asdf:
assignee: Robert P. Goldman (rpgoldman) → Faré (fahree)
status: Confirmed → 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.