[ feature request ] Support constraints in collection
setting in pack.toml
#293
Labels
feature request
Request for new functionality
collection
setting in pack.toml
#293
Local
pack.toml
s are very useful in setting desired requirements, especially when something non-standard needs to be reproducible, say when we ship a repository to, say, a customer.But sometimes we need to limit possible pack collections without saying a particular one -- say, we know that out code works on collection, say,
nightly-240621
because some library was added or some feature was implemented, and we hope that further collections are okay for that too, then we would like to set a constraint to the used collection in the localpack.toml
. Or, if we know that some feature is broken or, say, removed in collectionnightly-240625
, we may want to say that we need a collection strictly earlier than that.So, it's good if we can not only set particular collection, but set some constraints on them. In this case,
pack switch latest
would choose the latest available collection with respect to constraints in all localpack.toml
s (if they are present).pack build
now respectscollection
from the localpack.toml
, in the case of constraints it may choose the latest possible one conforming the constraints.Now we have only
nightly-
constraints, so we can compare them easily, but in the future we may potentially have several types of collections and several types of their numbering. I would suggest the following vision: collection names are interpreted as<basename>-<number>(.<number>)*
(where*
means "zero or more times") and collections with different basenames are incomparable, then numbers are compared from left to right. Lack of number may be interpreted as zero, or strictly less than any number.The text was updated successfully, but these errors were encountered: