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

Bazel 7 and MSVC compatible version updates #1711

Merged
merged 3 commits into from
Mar 10, 2025

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Mar 6, 2025

Description

Dependency version updates that still work with Bazel 6.5.0 and 7.5.0. Broken out from #1710, and part of #1482 and #1652.

Updates .bazelversion files to 7.5.0 and the CI builds in .bazelci/presubmit.yml to use Bazel 7.5.0. Sets common --enable_workspace --noenable_bzlmod in .bazelrc and tools/bazel.rc.buildkite.

Bumps the following dependencies, which should not cause build breakages on Windows + MSVC:

  • Go: 1.24.0 => 1.24.1
  • Scalafmt: 3.9.1 => 3.9.2
  • abseil-cpp: 20220623.1 => 20250127.0
  • grpc: 1.70.0 => 1.71.1
  • protobuf-java: 4.29.3 => 4.30.0
  • sbt-compiler-interface: 1.10.7 => 1.10.8
  • sbt-compiler-util: 1.10.7 => 1.10.10
  • google-common-protos: 2.52.0 => 2.53.0

Defers the following updates, which are already present in #1710:

  • protobuf: v21.7 => v28.3 (or v30.0)
  • rules_cc: 0.0.9 => 0.1.1
  • rules_proto: 6.0.2 => 7.1.0
  • rules_python: 0.38.0 => 1.2.0
  • scalapb: 0.11.17 => 1.0.0-alpha1

These deferred updates all need to happen together, as updating only a subset of them will break the build.

Motivation

This change is smaller and more focused than #1710, and should ultimately make that pull request smaller and/or easier to review.

--[no]enable_workspace and --[no]enable_bzlmod affect bazel query, and Bazel 8 defaults to --noenable_workspace --enable_bzlmod. Using common ensures bazel query sees the same settings as bazel build. This prevents the WORKSPACE run of test_semanticdb_handles_removed_sourcefiles from failing under Bazel 8.

Bazel 6.5.0 doesn't define --[no]enable_workspace, so it makes sense to include it in the change that sets all .bazelversion files to 7.5.0.

Dependency version updates that still work with Bazel 6.5.0 and 7.5.0.
Broken out from bazelbuild#1710, and part of bazelbuild#1482 and bazelbuild#1652.

Updates `.bazelversion` files to 7.5.0 and the CI builds in
`.bazelci/presubmit.yml` to use Bazel 7.5.0.

Bumps the following dependencies, which should not cause build breakages
on Windows + MSVC:

- Go: 1.24.0 => 1.24.1
- Scalafmt: 3.9.1 => 3.9.2
- `abseil-cpp`: 20220623.1 => 20250127.0
- `grpc`: 1.70.0 => 1.71.1
- `protobuf-java`: 4.29.3 => 4.30.0
- `sbt-compiler-interface`: 1.10.7 => 1.10.8
- `sbt-compiler-util`: 1.10.7 => 1.10.10
- `google-common-protos`: 2.52.0 => 2.53.0

Defers the following updates, which are already present in bazelbuild#1710:

- `protobuf`: v21.7 => v28.3 (or v30.0)
- `rules_cc`: 0.0.9 => 0.1.1
- `rules_proto`: 6.0.2 => 7.1.0
- `rules_python`: 0.38.0 => 1.2.0
- `scalapb`: 0.11.17 => 1.0.0-alpha1

These deferred updates all need to happen together, as updating only a
subset of them will break the build.

This change is smaller and more focused than bazelbuild#1710, and should
ultimately make that pull request smaller and/or easier to review.
@mbland mbland requested review from liucijus and simuons as code owners March 6, 2025 17:34
mbland added a commit to mbland/rules_scala that referenced this pull request Mar 6, 2025
Updates the `protobuf` version to one that's still compatible with Bazel
6.5.0 and 7.5.0 without updating `scalapb`. Broken out from bazelbuild#1710, and
part of bazelbuild#1482 and bazelbuild#1652.

Like bazelbuild#1711, updates `.bazelversion` files to 7.5.0 and the CI builds in
`.bazelci/presubmit.yml` to use Bazel 7.5.0.

Unlike bazelbuild#1711, contains only these updates:

- `abseil-cpp`: 20220623.1 => 20250127.0
- `protobuf`: v21.7 => v25.6

This change aims make bazelbuild#1710 smaller and more focused, and should
ultimately make that pull request smaller and/or easier to review.

Specifically, this is an attempt to see whether MSVC will build
successfully with `protobuf` v25.6. If it doesn't, I will update this
change to include the protocol compiler toolchainization changes
from bazelbuild#1710.
@mbland mbland mentioned this pull request Mar 6, 2025
This will make sure `protobuf` uses the version of `abseil-cpp` that we
import.
mbland added a commit to mbland/rules_scala that referenced this pull request Mar 7, 2025
Adds the `examples/overridden_artifacts` repository and the
corresponding `overridden_artifacts_example` test case in
`test/shell/test_examples.sh`. Broken out from bazelbuild#1710, and part of bazelbuild#1482
and bazelbuild#1652.

@dmivankov noticed the design bug in the upcoming Bzlmod API for
`overridden_artifacts` that this change addresses. See:

- bazelbuild#1482 (comment)
- bazelbuild#1482 (comment)

Makes `_validate_scalac_srcjar()` and `dt_patched_compiler_setup()` in
`scala/private/macros/scala_repositories.bzl` more tolerant of
dictionaries containing keys mapped to `None`. The new
`overridden_artifacts_example` test covers this.

Sets `.bazelversion` in the new repo to 7.5.0 to match changes in
both bazelbuild#1710 and bazelbuild#1711.

This change is smaller and more focused than bazelbuild#1710, and should
ultimately make that pull request smaller and/or easier to review.
These flags affect `bazel query`, and Bazel 8 defaults to
`--noenable_workspace --enable_bzlmod`. Using `common` ensures `bazel
query` sees the same settings as `bazel build`. This prevents the
`WORKSPACE` run of `test_semanticdb_handles_removed_sourcefiles` from
failing under Bazel 8.

Bazel 6.5.0 doesn't define `--[no]enable_workspace`, so it makes sense
to include it in the change that sets all `.bazelversion` files to
7.5.0.
simuons pushed a commit that referenced this pull request Mar 10, 2025
Adds the `examples/overridden_artifacts` repository and the
corresponding `overridden_artifacts_example` test case in
`test/shell/test_examples.sh`. Broken out from #1710, and part of #1482
and #1652.

@dmivankov noticed the design bug in the upcoming Bzlmod API for
`overridden_artifacts` that this change addresses. See:

- #1482 (comment)
- #1482 (comment)

Makes `_validate_scalac_srcjar()` and `dt_patched_compiler_setup()` in
`scala/private/macros/scala_repositories.bzl` more tolerant of
dictionaries containing keys mapped to `None`. The new
`overridden_artifacts_example` test covers this.

Sets `.bazelversion` in the new repo to 7.5.0 to match changes in
both #1710 and #1711.

This change is smaller and more focused than #1710, and should
ultimately make that pull request smaller and/or easier to review.
Copy link
Collaborator

@simuons simuons left a comment

Choose a reason for hiding this comment

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

Thanks, @mbland! So this is a farewell to bazel 6

@simuons simuons merged commit bfc9495 into bazelbuild:master Mar 10, 2025
2 checks passed
@mbland mbland deleted the msvc-compatible-version-bumps branch March 10, 2025 11:52
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