-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toolchainize twitter_scrooge (#1693)
* Toolchainize twitter_scrooge This is the last of the toolchain to receive the "toolchainization" treatment prior to Bzlmodification, and moves `twitter_scrooge()` to `twitter_scrooge/toolchain/toolchain.bzl` for `rules_java` 8 compatibility. Part of #1482 and #1652. * Use twitter_scrooge args dict, fix propagation As requested by @simuons in #1693, `scala_toolchains` now receives `twitter_scrooge` options as a `dict`. Since all of these options are for alternative toolchain dependencies, I've called this new `dict` argument `twitter_scrooge_deps`. However, after looking closely at how the options propagated, I realized they never made it to the toolchain generated by `scala_toolchains`. So this change also passes these options all the way through to the generated `BUILD` file and through the `setup_scala_toolchain()` call. * Retry ./test_reproducibility.sh on macOS Seemingly spurious failure during `git checkout`: - https://buildkite.com/organizations/bazel/pipelines/rules-scala-scala/builds/5350/jobs/0194f660-94eb-464a-a81d-9d1c576c2968/log ```txt cd /Users/buildkite/builds/bk-macos-intel-ggrd/bazel/rules-scala-scala $ cd /usr/local/var/bazelbuild⚠️ Warning: Checkout failed! getting/updating git mirror: setting remote URL: exit status 71 (Attempt 1/3 Retrying in 2s) $ cd /Users/buildkite/builds/bk-macos-intel-ggrd/bazel/rules-scala-scala $ cd /usr/local/var/bazelbuild⚠️ Warning: Checkout failed! getting/updating git mirror: setting remote URL: exit status 71 (Attempt 2/3 Retrying in 2s) $ cd /Users/buildkite/builds/bk-macos-intel-ggrd/bazel/rules-scala-scala $ cd /usr/local/var/bazelbuild⚠️ Warning: Checkout failed! getting/updating git mirror: setting remote URL: exit status 71 (Attempt 3/3) $ cd /Users/buildkite/builds/bk-macos-intel-ggrd/bazel/rules-scala-scala 🚨 Error: getting/updating git mirror: setting remote URL: exit status 71 ```
- Loading branch information
Showing
10 changed files
with
297 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,14 @@ | ||
load("//twitter_scrooge/toolchain:toolchain.bzl", "export_scrooge_deps", "scrooge_toolchain") | ||
load("//scala:providers.bzl", "declare_deps_provider") | ||
|
||
scrooge_toolchain( | ||
name = "scrooge_toolchain_impl", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
toolchain( | ||
name = "scrooge_toolchain", | ||
toolchain = ":scrooge_toolchain_impl", | ||
toolchain_type = "@io_bazel_rules_scala//twitter_scrooge/toolchain:scrooge_toolchain_type", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "aspect_compile_classpath_provider", | ||
deps_id = "aspect_compile_classpath", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//external:io_bazel_rules_scala/dependency/thrift/javax_annotation_api", | ||
"//external:io_bazel_rules_scala/dependency/thrift/libthrift", | ||
"//external:io_bazel_rules_scala/dependency/thrift/scrooge_core", | ||
"//external:io_bazel_rules_scala/dependency/thrift/util_core", | ||
"//scala/private/toolchain_deps:scala_library_classpath", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "compile_classpath_provider", | ||
deps_id = "compile_classpath", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//external:io_bazel_rules_scala/dependency/thrift/libthrift", | ||
"//external:io_bazel_rules_scala/dependency/thrift/scrooge_core", | ||
"//scala/private/toolchain_deps:scala_library_classpath", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "scrooge_generator_classpath_provider", | ||
deps_id = "scrooge_generator_classpath", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//external:io_bazel_rules_scala/dependency/thrift/scrooge_generator", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "compiler_classpath_provider", | ||
deps_id = "compiler_classpath", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//external:io_bazel_rules_scala/dependency/thrift/mustache", | ||
"//external:io_bazel_rules_scala/dependency/thrift/scopt", | ||
"//external:io_bazel_rules_scala/dependency/thrift/scrooge_generator", | ||
"//external:io_bazel_rules_scala/dependency/thrift/util_core", | ||
"//external:io_bazel_rules_scala/dependency/thrift/util_logging", | ||
"//scala/private/toolchain_deps:parser_combinators", | ||
], | ||
) | ||
|
||
export_scrooge_deps( | ||
name = "compile_classpath", | ||
deps_id = "compile_classpath", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_scrooge_deps( | ||
name = "aspect_compile_classpath", | ||
deps_id = "aspect_compile_classpath", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_scrooge_deps( | ||
name = "scrooge_generator_classpath", | ||
deps_id = "scrooge_generator_classpath", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_scrooge_deps( | ||
name = "compiler_classpath", | ||
deps_id = "compiler_classpath", | ||
visibility = ["//visibility:public"], | ||
) | ||
load( | ||
"//twitter_scrooge/toolchain:toolchain.bzl", | ||
"DEP_PROVIDERS", | ||
"export_scrooge_deps", | ||
) | ||
|
||
[ | ||
export_scrooge_deps( | ||
name = dep, | ||
deps_id = dep, | ||
visibility = ["//visibility:public"], | ||
) | ||
for dep in DEP_PROVIDERS | ||
] |
Oops, something went wrong.