-
Notifications
You must be signed in to change notification settings - Fork 2k
toolchain: auto resolve deps
#3271
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
base: develop
Are you sure you want to change the base?
Conversation
58b358d to
7afd7da
Compare
87f16ae to
7152f01
Compare
7152f01 to
8ec52ce
Compare
AndreMiras
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, looks good overall, pretty clear and nice feature thank you!
I just have a few remarks and concerns I'd like to discuss.
- It would be nice to have at least some basic unit tests for
is_wheel_platform_independent()(that one should be relatively easy) andprocess_python_modules()(that one is more tricky, but let's try to have at least some basic coverage). I noticed the code currently bypasses the new logic whenrecipe_build_orderis a Mock - having proper tests would let us remove that workaround. - Have we thought of having a
--no-auto-resolveor something like that for reproducible builds? - A bit tricky to integration test, I imagine that would mean having an app build with the requirements list not fully defined/pinned and test it runtime, but then we have some build reproducibility concerns. Do you have some ideas for how to make sure your changes don't get broken later on without us realising?
| if ctx.recipe_build_order.__class__.__name__ != "Mock": | ||
| modules = process_python_modules(ctx, modules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're better off updating the tests to maybe mock process_python_modules so it just returns modules as is or something like that than having a test bypass in the code itself
| shprint( | ||
| host_recipe.pip, 'install', *modules, | ||
| '--dry-run', '--break-system-packages', '--ignore-installed', | ||
| '--report', path, '-q', _env=env | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we handle any error gracefully here?
Like returning modules untouched.
We should probably still log the error for debugging, but not breaking the process if automatic module resolution doesn't work
Closes #3274
Package resolution is performed using the hostpython's
pipvia the--dry-runoption.Example
Output:
