Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ feature request ] Support constraints in collection setting in pack.toml #293

Open
buzden opened this issue Jul 2, 2024 · 0 comments
Open
Labels
feature request Request for new functionality

Comments

@buzden
Copy link
Collaborator

buzden commented Jul 2, 2024

Local pack.tomls 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 local pack.toml. Or, if we know that some feature is broken or, say, removed in collection nightly-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 local pack.tomls (if they are present).

pack build now respects collection from the local pack.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.

@buzden buzden added the feature request Request for new functionality label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new functionality
Projects
None yet
Development

No branches or pull requests

1 participant