Repository navigation
scala: let the root module choose Scala versions with scala_config.settings - #14441
Conversation
|
Generated by Claude Code |
|
Merge train: dropped, //tools/ci:starlark_docs_test fails: scala/private/toolchain/config_extension.bzl:65: attr "scala_version" has no doc; add doc = "" (also //tools/ci:test_budget_test: scala/tests/BUILD.bazel no-size 3, one more than on main) 🤖 Generated with Claude Code |
…ttings The scala_config extension moves to the public @rules_dx//scala:extensions.bzl and takes a root-only settings(scala_version, scala_versions) tag. It writes @rules_scala_config and a load-free @dx_scala_toolchains hub with a gated semanticdb, an upstream and a testing toolchain per version; MODULE.bazel registers @dx_scala_toolchains//:all. rules_dx adds Scala 2.12.21 as a dev version, and //scala/tests:third_version_test checks it resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzMfZnvvugXUYigRmF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
|
Fixed: added doc to the scala_version and scala_versions attrs of the _config_repository rule, and gave the third_version_test macro an explicit size so scala/tests/BUILD.bazel is back to 2 no-size sites like main. Rebased onto origin/main. starlark_docs_test and test_budget_test no longer report any scala finding (other findings are on main). The code changed, so the earlier needs-review review is stale and needs a fresh Review: comment. 🤖 Generated with Claude Code |
8d55833 to
664d947
Compare
|
Merge train: dropped, //tools/testing:toolchain_gate_test fails with this PR in the stack and passes on main and with the PR reverted: register_toolchains for a shared toolchain type needs 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
|
Fixed: merged fresh origin/main and moved the scala hub registration in tools/testing/toolchain_gate_test.rs from //scala/private/toolchain/hub:all to @dx_scala_toolchains//:all in the own-type list (the hub still only serves rules_dx's own toolchain types); //tools/testing:toolchain_gate_test passes. Code changed, so the earlier needs-review review is stale and needs a fresh Review: comment. 🤖 Generated with Claude Code |
|
Generated by Claude Code |
Main now registers @dx_scala_toolchains//:all (#14441), a toolchain hub every consumer fetches, so record run 44953085552 measures one more repo on Linux in every stage: core 236, python 239 and 250. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvdk6FgsNTgASkdvZF
Main now registers @dx_scala_toolchains//:all (#14441), a toolchain hub every consumer fetches, so record run 44953085552 measures one more repo on Linux in every stage: core 236, python 239 and 250. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvdk6FgsNTgASkdvZF
Pull Request
Linked Issue
Closes #14401
Changes
@rules_dx//scala:extensions.bzlexportsscala_config. It has a root-onlysettings(scala_version, scala_versions)tag. With no tag, the versions stay Scala 2.13.18 (default) and 3.3.9. More than onesettingstag fails, and so does a version that isn't<major>.<minor>.<patch>.@rules_scala_configand a load-free hub repo,@dx_scala_toolchains. For each version the hub has:toolchain(), gated on//config:toolchains(semanticdb_scala3_implfor 3.x,semanticdb_implotherwise),MODULE.bazelnow uses the public extension and registers@dx_scala_toolchains//:all.scala/private/toolchain/hub/BUILD.bazelkeeps only the twotoolchain_types.//scala/tests:third_version_testchecks that it resolves the dx semanticdb toolchain and a testing toolchain.scala/README.mdgains a "Scala versions" section.api/starlark.jsonanddocs/supported-surface.mdare regenerated withbazel run //tools/api:update. That also picks up appletestonlyand phpfrom_sourcedrift that was already on main.Verification
Tested:
//scala/...(including the new//scala/tests:third_version_test),//tools/api:api_test,//core/modules:versions_contract,//tools/ci:bzl_visibility_test: all passed.tools/dx check --applyon the touched files: format is clean. The two lint warnings are on lines already on main: thedocs/languages/scala.mdlink inscala/README.md, and theimplicitsscalacopt. Typecheck fails on main's docs site: "dangling link '../deploy/README.md#pypi_deploy'".Not run: the nested consumer tests (
//tools/testing/consumer:cold_start_test). They can't run in this container.Generated by Claude Code