-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
fix: in-repo plugin requirements.txt not loading #20355
Conversation
This fixed the change that was introduced on pantsbuild#19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file.
@kaos Unfortunately the original PR had an issue :( Thanks |
Is this something we can add a regression test for? |
I’m not sure, maybe you’ll have a suggestion. The problem only occurs when you try to load a in-repo plugin that has 3rd party dependencies, and it’s path is not already in sys.path |
This fixed the change that was introduced on pantsbuild#19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file.
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.
Thanks. would be great with a test for it, but let's not hold perfect as the enemy of landing this here.. :)
Thanks for approving! I've updated the existing test to reflect the change, so we're covered :) |
This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file. --------- Co-authored-by: Idan Attias <[email protected]>
I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants. ✔️ 2.19.xSuccessfully opened #20381. Thanks again for your contributions! |
…) (#20381) This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file. Co-authored-by: Idan Attias <[email protected]> Co-authored-by: Idan Attias <[email protected]>
This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered,
_collect_backends_requirements
fails to load in-repo plugins, thus ignoring the requirements.txt file.