Skip to content

refactor: make env marker config available through target and flag #2853

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

Merged
merged 7 commits into from
May 6, 2025

Conversation

rickeylev
Copy link
Collaborator

@rickeylev rickeylev commented May 3, 2025

This factors creation of (most of) the env marker dict into a separate target and
provides a label flag to allow customizing the target that provides it.

This makes it easier for users to override how env marker values are computed. The
env_marker_setting rule will still, if necessary, compute values from the toolchain,
but existing keys (computed from the env marker config target) have precedence.

The EnvMarkerInfo provider is the interface for implementing a custom env marker
config target; it will be publically exposed in a subsequent PR.

Along the way, unify how the env dict and defaults are set.

Work towards #2826

@rickeylev rickeylev requested review from aignas and groodt as code owners May 3, 2025 03:38
@rickeylev rickeylev force-pushed the pep508.env.marker.config branch from 843b7c8 to 639df2e Compare May 3, 2025 03:40
@rickeylev rickeylev force-pushed the pep508.env.marker.config branch from 639df2e to f8b4446 Compare May 3, 2025 03:47
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

LGTM in general, we can talk about exposing the EnvMarkerInfo provider in a followup PR that uncomments the docs.

@aignas
Copy link
Collaborator

aignas commented May 3, 2025

Created #2855 to allow enabling the starlark deps paths more easily.

@rickeylev rickeylev enabled auto-merge May 3, 2025 20:33
@rickeylev rickeylev added this pull request to the merge queue May 6, 2025
Merged via the queue into bazel-contrib:main with commit 0b3d845 May 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants