-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Support intersection of versions #394
Conversation
Co-authored-by: Johannes Müller <[email protected]>
@waj FWIW, I believe that a compound keyword is more apt in this case than intersection. I'd use compound requirement - as in bundler, see: |
Composer calls them version ranges. They also seem to allow |
@Blacksmoke16 I don't know about the Composer, but they're not ranges, that's for sure :) |
@Sija How is it not? |
@Blacksmoke16 because |
@Sija Still could be interpreted as |
@Blacksmoke16 Yeah, that's a compound (range) statement you've got there... |
I prefer the word "intersection" because it's more explicit about how the expressions are composed. In the future, if we add other operators like |
@waj That's not intersection though... And the comma used there is analogous to |
@Sija It's the intersection of the version sets defined by each expression. In math intersection and logical and are very close concepts. Also, I'm not the only one using this term for this: https://dart.dev/tools/pub/dependencies#traditional-syntax |
@waj Not if you add |
@Sija It’s intersection. All comma separated constraints need to be satisfied. Even if != is supported. https://www.siyavula.com/read/maths/grade-10/probability/14-probability-03 If or/union is added later is another matter. |
Quite likely I'm misunderstanding the term in this context but I don't see any (intersecting) sets here. I mean we have constraints, yes, but not sets. By set intersection I'd understand having But maybe my brain is playing tricks on me 🤷♂️ |
@Sija do you realise we're discussing for a word it doesn't even appear in the documentation, right? It's just the issue name and a spec description at most 😄 It's not brain tricks. Just different ways to see the same. When you say |
With this merged in, it would be good to add support for |
This adds support for version specifiers like:
>= 1.0.0, < 2.0
I need this to implement #365, but I think it's also nice addition. Other dependency managers also support expressions like that.