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

Move getConfigConditions into ConfiguredTarget. #12550

Closed

Conversation

katre
Copy link
Member

@katre katre commented Nov 24, 2020

Uses a default value for non-alias and non-rule CTs.

This alloows removing many instanceof/cast checks when getting config
conditions.

Part of the work on #11993.

Uses a default value for non-alias and non-rule CTs.

This alloows removing many instanceof/cast checks when getting config
conditions.

Part of the work on bazelbuild#11993.
@katre katre requested a review from juliexxia November 24, 2020 16:33
@katre katre requested a review from lberki as a code owner November 24, 2020 16:33
@google-cla google-cla bot added the cla: yes label Nov 24, 2020
Copy link
Contributor

@juliexxia juliexxia left a comment

Choose a reason for hiding this comment

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

Really lovely simplification

@@ -696,6 +696,7 @@ java_library(
name = "configured_target",
srcs = ["ConfiguredTarget.java"],
deps = [
":config/config_matching_provider",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is totally orthogonal to your PR and just something I've never understood - why have a slash in a target name as opposed to just putting it under a directory called config?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because analysis_cluster contains files from inside the config subdirectory, config can't be its own package with its own BUILD file.

Ideally we'd further break up analysis_cluster and fix this, but it's a hard problem and I couldn't crack it last time I tried.

@bazel-io bazel-io closed this in e87feb8 Nov 24, 2020
@katre katre deleted the i11993-02-get-config-conditions branch November 24, 2020 21:56
philwo pushed a commit that referenced this pull request Mar 15, 2021
Uses a default value for non-alias and non-rule CTs.

This alloows removing many instanceof/cast checks when getting config
conditions.

Part of the work on #11993.

Closes #12550.

PiperOrigin-RevId: 344126290
philwo pushed a commit that referenced this pull request Mar 15, 2021
Uses a default value for non-alias and non-rule CTs.

This alloows removing many instanceof/cast checks when getting config
conditions.

Part of the work on #11993.

Closes #12550.

PiperOrigin-RevId: 344126290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants