Feature/issue 1100 provides#2137
Open
manuelkoester wants to merge 11 commits into
Open
Conversation
a97b06b to
9d9cbb2
Compare
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
…tion tests Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
…as wanted yet. but at least has coverage now Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
Signed-off-by: Manuel Köster <manuelkoestercg@gmail.com>
9d9cbb2 to
a63fa69
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2137 +/- ##
==========================================
+ Coverage 61.32% 61.42% +0.10%
==========================================
Files 164 164
Lines 20568 20637 +69
Branches 3575 3598 +23
==========================================
+ Hits 12613 12676 +63
- Misses 7084 7087 +3
- Partials 871 874 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.provides.*ephemeralsThe goal of the provides feature is to be able to describe one package being bundled or
providedby another. Therefore if aprovidespackage is encountered it would be resolved & used in lieu of its possibly real package counterpartThis is especially usefull for things like DCCs which tend to ship a lot of their libraries/interpreters bundled as part of themselves. Houdini example: https://www.sidefx.com/docs/houdini/licenses/index.html
Before this there was no clean way to tell rez "this app already has python, do not pull in the actual python package"
I've opted to implement this feature via ephemerals and not an explicit package attribute like
provides = [..]as with ephemerals it direclty works for variants and it also doesn't need an additional concept in the solverTo add a provided package to a package you add the provided package to the requirements and prefix it with
.provides.How it behaves
A package that bundles its own python:
Any request for the provided package that intersects the provided range gets satisfied by the provider.
The real package is not resolved, doesn't show up in the resolved list, and doesn't even need to exist in a repo.
The
.provides.*ephemeral itself stays visible in the resolve:A request outside the provided range is a conflict, not a second python:
These are just normal package requests, so users can pass them too:
rez-env '.provides.python-3.7' my_tool~ "python is on the system"For more examples take a look at the tests in test_solver.py
Open questions
I'm not sure how we should handle multiple providers for teh same package. Currently it does resolve and just lets all providers provide the package (test covered in test_solver.py)
I'm also generally interested if people think this is the way to go about it
Additional Ref / discussion dump
rez/ASWF/TSC/meeting-notes/2023-01-19.md
Line 201 in bb5ce44