Skip to content

Use rules_scala v7.0.0 from GitHub, bump versions #389

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

mbland
Copy link
Contributor

@mbland mbland commented May 9, 2025

Using the rules_scala Bazel module, upgrading from v6.6.0 to v7.0.0, is the most significant change here. Will update MODULE.bazel to use rules_scala from the Bazel Central Registry after bazelbuild/bazel-central-registry#4552 lands.

Lots of other version bumps:

  • Bazel: 8.2.0 => 8.2.1
  • Go: 1.22.5 => 1.24.3
  • apple_support: 1.15.1 => 1.22.0
  • aspect_rules_ts: 2.4.2 => 3.5.3
  • com.google.oauth-client:google-oauth-client: 1.36.0 => 1.39.0
  • commons-cli:commons-cli: 1.8.0 => 1.9.0
  • engflowapis-java: 2025.01.17-13.50.20 => 2025.03.14-12.58.52
  • gazelle: 0.37.0 => 0.43.0
  • googleapis: 0.0.0-20240326-1c8d509c5 => 0.0.0-20241220-5e258e33.bcr.1
  • grpc-java: 1.64.0 => 1.71.0
  • io.netty:netty-handler: 4.1.111.Final => 4.1.121.Final
  • protobuf: v23.1 => v30.2
  • rules_cc: 0.0.9 => 0.1.1
  • rules_dotnet: 0.18.1 => 0.18.2
  • rules_go: 0.48.1 => 0.54.0
  • rules_java: 7.9.1 => 8.11.0
  • rules_jvm_external: 6.2 => 6.7
  • rules_kotlin: 1.9.6 => 2.1.4
  • rules_perl: 0.2.0 => 0.4.1
  • rules_proto_grpc: 5.0.0-alpha2 => 5.0.1
  • rules_proto: 6.0.2 => 7.1.0
  • rules_python: 1.0.0 => 1.4.1
  • rules_swift: 1.18.0 => 2.8.2

Other changes:

  • Adds scala/0001-protobuf-19679-rm-protoc-dep.patch and adds common --incompatible_enable_proto_toolchain_resolution to .bazelrc. This enables the precompiled protoc toolchain from rules_scala, @rules_scala_protoc_toolchains.

  • Updates C++ compiler flags in .bazelrc to -std=c++17 to build protobuf v30.2 remotely on an EngFlow cluster.

  • Updates README.md to include the EngFlow credential helper in .bazelrc.user, and to specify --config=engflow as needed.

  • Updates @rules_scala and @rules_swift references in BUILD files.

  • Ran bazel mod tidy to standardize the formatting of MODULE.bazel.

Using the `rules_scala` Bazel module, upgrading from v6.6.0 to v7.0.0,
is the most significant change here. Will update `MODULE.bazel` to use
`rules_scala` from the Bazel Central Registry after
bazelbuild/bazel-central-registry#4552 lands.

Lots of other version bumps:

- Bazel: 8.2.0 => 8.2.1
- Go: 1.22.5 => 1.24.3
- `apple_support`: 1.15.1 => 1.22.0
- `aspect_rules_ts`: 2.4.2 => 3.5.3
- `com.google.oauth-client:google-oauth-client`: 1.36.0 => 1.39.0
- `commons-cli:commons-cli`: 1.8.0 => 1.9.0
- `engflowapis-java`: 2025.01.17-13.50.20 => 2025.03.14-12.58.52
- `gazelle`: 0.37.0 => 0.43.0
- `googleapis`: 0.0.0-20240326-1c8d509c5 => 0.0.0-20241220-5e258e33.bcr.1
- `grpc-java`: 1.64.0 => 1.71.0
- `io.netty:netty-handler`: 4.1.111.Final => 4.1.121.Final
- `protobuf`: v23.1 => v30.2
- `rules_cc`: 0.0.9 => 0.1.1
- `rules_dotnet`: 0.18.1 => 0.18.2
- `rules_go`: 0.48.1 => 0.54.0
- `rules_java`: 7.9.1 => 8.11.0
- `rules_jvm_external`: 6.2 => 6.7
- `rules_kotlin`: 1.9.6 => 2.1.4
- `rules_perl`: 0.2.0 => 0.4.1
- `rules_proto_grpc`: 5.0.0-alpha2 => 5.0.1
- `rules_proto`: 6.0.2 => 7.1.0
- `rules_python`: 1.0.0 => 1.4.1
- `rules_swift`: 1.18.0 => 2.8.2

Other changes:

- Adds `scala/0001-protobuf-19679-rm-protoc-dep.patch` and adds `common
  --incompatible_enable_proto_toolchain_resolution` to `.bazelrc`. This
  enables the precompiled `protoc` toolchain from `rules_scala`,
  `@rules_scala_protoc_toolchains`.

- Updates C++ compiler flags in `.bazelrc` to `-std=c++17` to build
  `protobuf` v30.2 remotely on an EngFlow cluster.

- Updates `README.md` to include the EngFlow credential helper in
  `.bazelrc.user`, and to specify `--config=engflow` as needed.

- Updates `@rules_scala` and `@rules_swift` references in `BUILD` files.

- Ran `bazel mod tidy` to standardize the formatting of `MODULE.bazel`.
@mbland mbland requested review from jayconrod and benjaminp May 9, 2025 20:37
Copy link
Contributor

@benjaminp benjaminp left a comment

Choose a reason for hiding this comment

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

slick

The `repo_name` values are no longer necessary. Elided each updated
`bazel_dep` declaration onto a single line and ran `bazel mod tidy`.

Also checked to see why we're still building `protoc`. Looks like
`@grpc-java` is the culprit:

```sh
$ bazel query 'allpaths("//...", "@protobuf//:protoc")'

//java/com/engflow/notificationqueue:client
//java/com/engflow/notificationqueue/demoserver:server
//java/com/engflow/notificationqueue/demoserver:server_java_grpc_proto
@engflowapis-java//engflow/eventstore/v1:build_event
@engflowapis-java//engflow/eventstore/v1:build_event.internal.grpc
@engflowapis-java//engflow/eventstore/v1:eventstore
@engflowapis-java//engflow/eventstore/v1:eventstore.internal.grpc
@engflowapis-java//engflow/eventstore/v1:notifications
@engflowapis-java//engflow/eventstore/v1:notifications.internal.grpc
@engflowapis-java//engflow/eventstore/v1:v1
@engflowapis-java//engflow/notification/v1:notification
@engflowapis-java//engflow/notification/v1:notification.internal.grpc
@engflowapis-java//engflow/notification/v1:notification_queue
@engflowapis-java//engflow/notification/v1:notification_queue.internal.grpc
@engflowapis-java//engflow/notification/v1:v1
@grpc-java//compiler:java_grpc_library_toolchain
@protobuf//:protoc
```
@mbland
Copy link
Contributor Author

mbland commented May 9, 2025

@benjaminp @jayconrod Thanks! I also just pushed one more commit to clean up the now unnecessary repo_name parameters from all bazel_dep declarations. I'll merge once the CI build finishes.

FYI, while I was at it, I checked to see why bazel build //... still compiles protoc. Looks like the notification queue's @grpc-java dependency is the culprit:

$ bazel query 'allpaths("//...", "@protobuf//:protoc")'

//java/com/engflow/notificationqueue:client
//java/com/engflow/notificationqueue/demoserver:server
//java/com/engflow/notificationqueue/demoserver:server_java_grpc_proto
@engflowapis-java//engflow/eventstore/v1:build_event
@engflowapis-java//engflow/eventstore/v1:build_event.internal.grpc
@engflowapis-java//engflow/eventstore/v1:eventstore
@engflowapis-java//engflow/eventstore/v1:eventstore.internal.grpc
@engflowapis-java//engflow/eventstore/v1:notifications
@engflowapis-java//engflow/eventstore/v1:notifications.internal.grpc
@engflowapis-java//engflow/eventstore/v1:v1
@engflowapis-java//engflow/notification/v1:notification
@engflowapis-java//engflow/notification/v1:notification.internal.grpc
@engflowapis-java//engflow/notification/v1:notification_queue
@engflowapis-java//engflow/notification/v1:notification_queue.internal.grpc
@engflowapis-java//engflow/notification/v1:v1
@grpc-java//compiler:java_grpc_library_toolchain
@protobuf//:protoc

@mbland mbland merged commit fb37786 into main May 9, 2025
5 checks passed
@mbland mbland deleted the rules_scala-and-version-bumps branch May 9, 2025 21:03
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.

3 participants