Version specifiers and constraints

Eric Timmons etimmons at mit.edu
Tue Nov 23 03:59:47 UTC 2021


Attached is a patch to ASDF's documentation that describes what I plan 
to implement to allow ASDF to have both customizable version specifiers 
and more expressive version constraints. I would appreciate concrete 
feedback on this proposal.

Additionally, this diff exists on MR !169 if you would prefer to give 
feedback that way. If you do, please mostly ignore the non-documentation 
changes. The other changes were made quite a while ago and don't take 
into account some of the recent feedback I've received.

Some notes:

To support extensible version specifiers, I started with Didier's 
approach (first discussed at 
<https://mailman.common-lisp.net/pipermail/asdf-devel/2015-June/004698.html>, 
I believe). However, that approach required a non-standard system class 
if you wanted to extend the version specifier. That seemed rather 
heavy-handed, so I moved to an approach where you can specify a 
:version-class in your defsystem. This should also make it composable 
with custom classes. However, if you foresee issues with that, we can 
change it back.

One of the version classes provided by UIOP is called semantic-version. 
It implements only the semver grammar and ordering relationships. It 
does not implement any sort of constraint on major versions matching or 
the like (note that such a thing is not even required by the semver 
spec!). However, I realize that "semantic version" can be a loaded term, 
so I'm happy to discuss changing the name of the class if anyone has a 
workable idea.

The other version class is called default-version. Currently it's a 
subclass of semantic-version. However, given Robert's recent suggestion 
to limit the pre-release segment to alpha/beta/rc and an optional 
integer, that could be changed. In fact, we could implement Didier's 
preferred grammar as well, where X.Y.ZaW would be equivalent to 
X.Y.Z-alpha.W and the same with b/beta and rc/rc. The attractive thing 
about that is it means ASDF's defaults would likely cover the vast 
majority of version grammars developers would want to use.

I'm particularly interested in feedback on the :compatible-versions 
argument to defsystem. I don't think any other build tool I have 
experience with provides such a thing. However, it seems like an elegant 
way to address the common complaint that more expressive version 
constraints encourage a system consumer to block versions of their 
dependencies that haven't even been released yet.

-Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asdf-version-specifiers-and-constraints.diff
Type: text/x-patch
Size: 32974 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20211122/496deadd/attachment-0001.bin>


More information about the asdf-devel mailing list