Skip to content

Commit

Permalink
Split ConfigurationTransitionApi to a new target.
Browse files Browse the repository at this point in the history
This helps to reduce dependency cycles.

Work towards composable starlark transitions: bazelbuild#22248.

PiperOrigin-RevId: 636260650
Change-Id: I17c0137e9d442fb02cf51e360ede876b4d92f6c4
  • Loading branch information
katre authored and copybara-github committed May 22, 2024
1 parent 0e9287f commit 739f7b8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/google/devtools/build/lib/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/events",
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//src/main/java/com/google/devtools/build/lib/util",
"//src/main/java/com/google/devtools/build/lib/vfs:pathfragment",
"//src/main/java/com/google/devtools/common/options",
Expand Down Expand Up @@ -2164,6 +2165,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:serialization-constant",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//third_party:auto_value",
],
)
Expand Down Expand Up @@ -2584,6 +2586,7 @@ java_library(
":config/transitions/no_transition",
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//src/main/java/net/starlark/java/eval",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:serialization-constant",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/core",
"//src/main/java/com/google/devtools/build/lib/util",
"//src/main/java/com/google/devtools/build/lib/util:filetype",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:serialization-constant",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:starlark_toolchain_type_requirement",
"//src/main/java/com/google/devtools/build/lib/vfs:pathfragment",
"//src/main/java/com/google/devtools/common/options",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/main/java/com/google/devtools/build/lib/packages/semantics",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config:configuration_transition_api",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/core",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp",
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ filegroup(
visibility = ["//src:__subpackages__"],
)

java_library(
name = "configuration_transition_api",
srcs = ["ConfigurationTransitionApi.java"],
deps = [
"//src/main/java/com/google/devtools/build/docgen/annot",
"//src/main/java/net/starlark/java/annot",
"//src/main/java/net/starlark/java/eval",
],
)

java_library(
name = "starlark_toolchain_type_requirement",
srcs = ["StarlarkToolchainTypeRequirement.java"],
Expand All @@ -34,9 +44,13 @@ java_library(
name = "config",
srcs = glob(
["*.java"],
exclude = ["StarlarkToolchainTypeRequirement.java"],
exclude = [
"ConfigurationTransitionApi.java",
"StarlarkToolchainTypeRequirement.java",
],
),
deps = [
":configuration_transition_api",
":starlark_toolchain_type_requirement",
"//src/main/java/com/google/devtools/build/docgen/annot",
"//src/main/java/com/google/devtools/build/lib/cmdline",
Expand Down

0 comments on commit 739f7b8

Please sign in to comment.