Skip to content
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 Pantsd not properly invalidating when CPPFLAGS and LDFLAGS change #17009

Conversation

chrisjrn
Copy link
Contributor

@chrisjrn chrisjrn commented Sep 26, 2022

This adds PythonNativeCodeEnvironment, a value created by a rule that encapsulates the environment var fetching needed to make PythonNativeCodeSubsystem.EnvironmentAware resolve correctly.

Fixes #14612

…iously

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@chrisjrn chrisjrn marked this pull request as ready for review September 26, 2022 20:41
@chrisjrn chrisjrn added the category:internal CI, fixes for not-yet-released features, etc. label Sep 26, 2022
@chrisjrn
Copy link
Contributor Author

chrisjrn commented Sep 26, 2022

I think I can do better than needing yet another data type and manually creating rules, but don't let that get in the way of reviewing this.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! This can be classified as a bug fix and the PR title rewritten to something like "Fix Pantsd not properly invalidating when CPPFLAGS and LDFLAGS change"

@chrisjrn chrisjrn added category:bugfix Bug fixes for released features and removed category:internal CI, fixes for not-yet-released features, etc. labels Sep 26, 2022
@chrisjrn chrisjrn changed the title Resolve python-native-code envvars using EnvironmentVars Fix Pantsd not properly invalidating when CPPFLAGS and LDFLAGS change Sep 26, 2022
@chrisjrn chrisjrn merged commit 9769d88 into pantsbuild:main Sep 26, 2022
chrisjrn pushed a commit that referenced this pull request Sep 27, 2022
This extends #17009 by making a generic mechanism to request environment variables when `EnvironmentAware` subsystems are constructed.

Generally speaking, this encapsulates both the requesting and consumption of environment variables into the subsystem itself, and this will save subsystem consumers from knowing which environment variables to request in order to call an option post-processing method. All option post-processing methods should safely be able to be converted to properties too. All very exciting.

Fixes #14612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[python-native-code] breaks Pantsd cache invalidation
2 participants