ASDF components are brittle for backwards compatibility
Robert Goldman
rpgoldman at sift.info
Thu Apr 29 16:12:44 UTC 2021
ASDF checks to make sure all of the initargs are defined when parsing a
`defsystem`. This is good for catching errors, but is terrible for
extensibility. This means that any attempt to add additional metadata
will be backwards incompatible.
I can think of two ways to fix this:
1. Add a "garbage can" slot to `component` that will be filled with a
property list, and allow programmers to do whatever they want here.
This doesn't seem great to me.
2. Add a new `defsystem` parsing error class that is
`unknown-component-property`, raise it when an unknown property is
encountered and allow the user to continue, discarding the initarg and
accompanying value.
The second alternative is what I favor. It isn't great, because it will
only maintain extensibility going forward, but I think it's the best we
can do.
I suppose that we could also add an initarg to tell ASDF to continue
such errors silently. I'd be inclined to suggest that this take an ASDF
version expression as value, so that the error is quietly ignored only
by ASDF versions below that. This means that the property will start to
be checked when it has become authoritative.
Note that for one's own `system` and `component` subclasses, the set of
initargs can be extended without any monkeying around.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20210429/4592599f/attachment.html>
More information about the asdf-devel
mailing list