-
Notifications
You must be signed in to change notification settings - Fork 4
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
Why are there //:pants-requirements.txt dependencies? #1
Comments
I think because the user that generated this out of their real repo used |
So these deps are explicit, but were generated from the inferred deps in a real repo. |
Ok. So then part of all this is simply the v1 macros problem. Instead of depending on python_requirements / python_requirement_libraries only, there is a dependence on the file that generates them. As such, rules that act on dependencies will get triggered to re-run for any whitespace change. |
pantsbuild/pants#12915 is the relevant ticket then. |
Actually, pantsbuild/pants#12915 aside, we have a second over-invalidation in this case since the Lines 8 to 10 in 278948e
As such, we fully invalidate the cached resolve process on any edit to |
So a pure-annoyance optimization, since we already fully parse the constraints file anyhow, is to used the parsed constraints to emit a normalized constraints file for the input to the process. This would eliminate whitespace / comment edits in the constraint file invalidating the resolve. |
Yea, that makes sense. Because the macro issue alone would not invalidate the resolve (although it might invalidate tests, etc). |
Ok. Small bug in that this is only for the (nearly legacy) psuedo-constraints-lockfile hack. Potentially not worth fixing, but also not hard to fix. |
I see an opportunity/necessity to do this as part of pantsbuild/pants#14053 |
…raints. (#14064) Some callers (#14058) of `PexRequirements` will soon need to be able to specify explicit constraints for building a PEX which are _not_ the global constraints. Additionally, consuming the `constraints` directly as a file (rather than parsing and re-materializing the file) forces whitespace/comment edits to the constraints file to invalidate all resolves ([reported here](pantsbuild/requirements-perf#1 (comment))). To fix this, replace `apply_constraints: bool` (for the global constraints) with an explicit list of constraints. [ci skip-rust] [ci skip-build-wheels]
requirements-perf/aa/ab/ac/ad/ae/af/BUILD
Line 9 in 278948e
The text was updated successfully, but these errors were encountered: