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

Weak Requirement Range Causes Conflict #1824

Closed
Anti-Distinctlyminty opened this issue Sep 5, 2024 · 7 comments
Closed

Weak Requirement Range Causes Conflict #1824

Anti-Distinctlyminty opened this issue Sep 5, 2024 · 7 comments
Labels
difficulty/easy This task is easy documentation help wanted Help us improve rez

Comments

@Anti-Distinctlyminty
Copy link

The weak requirement ~houdini-19+<=20.5 causes a conflict when using the package houdini-20.5.

I thought that by default if a minor/patch version is not specified, then it means "all are ok". But this appears to not be the case.

Environment

  • OS Windows 10
  • Rez version 2.112.0
  • Rez python version 3.9.13

To Reproduce

  1. Create two packages, one defining houdini-20.5, the other with the requirement ~houdini-19+<=20.5.
  2. Attempt a rez-env

Expected behavior
houdini-20.5 should be accepted by the requirement ~houdini-19+<=20.5.

Actual behavior
image

@JeanChristopheMorinPerso
Copy link
Member

This is expected AFAIK:

>>> ver_range = rez.version.VersionRange('houdini-19+<=20.5')
>>> ver_range.contains_version(rez.version.Version('20.5.278'))
False

20.5.278 is greater than 20.5 here.

@Anti-Distinctlyminty
Copy link
Author

Fair enough. Might be a point for the docs, unless I'm the only one who was caught out by this :)

@JeanChristopheMorinPerso JeanChristopheMorinPerso added documentation help wanted Help us improve rez difficulty/easy This task is easy and removed bug labels Oct 13, 2024
@JeanChristopheMorinPerso
Copy link
Member

Sure thing @Anti-Distinctlyminty. Would you like to submit a pull request to improve our docs in that area?

@Anti-Distinctlyminty
Copy link
Author

Absolutely. I'll add it to my todo list :)

@AHB102
Copy link

AHB102 commented Nov 12, 2024

@Anti-Distinctlyminty Would you like to proceed with a PR, or should I close this issue?

sarah-kamall pushed a commit to sarah-kamall/rez that referenced this issue Nov 12, 2024
…areFoundation#1824)

Adjusted weak statement to specify that upper limit also includes patch versions.
sarah-kamall pushed a commit to sarah-kamall/rez that referenced this issue Nov 12, 2024
…areFoundation#1824)

Adjusted weak statement to specify that upper limit also includes patch versions.
Signed-off-by: Sarah Soliman
sarah-kamall added a commit to sarah-kamall/rez that referenced this issue Nov 12, 2024
…areFoundation#1824)

Adjusted weak statement to specify that upper limit also includes patch versions.
Signed-off-by: Sarah Soliman
sarah-kamall added a commit to sarah-kamall/rez that referenced this issue Nov 12, 2024
…areFoundation#1824)

Adjusted weak statement to specify that upper limit also includes patch versions.

Signed-off-by: sarah-kamall <[email protected]>
@Anti-Distinctlyminty
Copy link
Author

Anti-Distinctlyminty commented Nov 17, 2024 via email

@Anti-Distinctlyminty
Copy link
Author

@Anti-Distinctlyminty Would you like to proceed with a PR, or should I close this issue?

I think you can close as Sarah's PR addresses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/easy This task is easy documentation help wanted Help us improve rez
Projects
None yet
Development

No branches or pull requests

4 participants
@Anti-Distinctlyminty @JeanChristopheMorinPerso @AHB102 and others