rez icon indicating copy to clipboard operation
rez copied to clipboard

Weak Requirement Range Causes Conflict

Open Anti-Distinctlyminty opened this issue 1 year ago • 4 comments

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

Anti-Distinctlyminty avatar Sep 05 '24 13:09 Anti-Distinctlyminty

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.

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

Anti-Distinctlyminty avatar Sep 05 '24 19:09 Anti-Distinctlyminty

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

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

Anti-Distinctlyminty avatar Oct 14 '24 16:10 Anti-Distinctlyminty

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

AHB102 avatar Nov 12 '24 18:11 AHB102

It is on my todo list. I would like to contontribute.

On Tue, 12 Nov 2024 at 19:35, Archit H Barve @.***> wrote:

@Anti-Distinctlyminty https://github.com/Anti-Distinctlyminty Would you like to proceed with a PR, or should I close this issue?

— Reply to this email directly, view it on GitHub https://github.com/AcademySoftwareFoundation/rez/issues/1824#issuecomment-2471285387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKQRM73DFJ35EDAILME4QL2AJC65AVCNFSM6AAAAABNWQLRTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRGI4DKMZYG4 . You are receiving this because you were mentioned.Message ID: @.***>

Anti-Distinctlyminty avatar Nov 17 '24 18:11 Anti-Distinctlyminty

@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.

Anti-Distinctlyminty avatar Dec 08 '24 16:12 Anti-Distinctlyminty