Skip to content

Conversation

@jwnimmer-tri
Copy link
Contributor

@jwnimmer-tri jwnimmer-tri commented Sep 27, 2025

This fixes various warnings when building with the newest Bazel.

(FYI the version index lives at https://registry.bazel.build/.)

Copy link
Contributor

@nosracd nosracd left a comment

Choose a reason for hiding this comment

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

I had some suggestions for potential improvements, but no hard objections to these changes. Let me know when you'd like me to bring them in

MODULE.bazel Outdated
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "rules_java", version = "8.16.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

This change appears to solve one warning, but introduce several new warnings:

$ bazel build //...
INFO: Analyzed 88 targets (142 packages loaded, 6004 targets configured).
INFO: From Compiling Java headers external/rules_jvm_external+/private/tools/java/com/github/bazelbuild/rules_jvm_external/librules_jvm_external-hjar.jar (3 source files) [for tool]:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:~/.cache/bazel/_bazel_user/8517c2ab501aa9d3be9d792c628f0b8a/external/rules_java++toolchains+remote_java_tools/java_tools/turbine_direct_binary_deploy.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
INFO: From Compiling Java headers external/rules_jvm_external+/private/tools/java/com/github/bazelbuild/rules_jvm_external/zip/libzip-hjar.jar (1 source file) [for tool]:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:~/.cache/bazel/_bazel_user/8517c2ab501aa9d3be9d792c628f0b8a/external/rules_java++toolchains+remote_java_tools/java_tools/turbine_direct_binary_deploy.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
INFO: From Compiling Java headers lcm-java/liblcm-java-hjar.jar (32 source files):
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:~/.cache/bazel/_bazel_user/8517c2ab501aa9d3be9d792c628f0b8a/external/rules_java++toolchains+remote_java_tools/java_tools/turbine_direct_binary_deploy.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
INFO: From Compiling Java headers test/java/libmessages-hjar.jar (11 source files):
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:~/.cache/bazel/_bazel_user/8517c2ab501aa9d3be9d792c628f0b8a/external/rules_java++toolchains+remote_java_tools/java_tools/turbine_direct_binary_deploy.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
INFO: Found 88 targets...
INFO: Elapsed time: 7.767s, Critical Path: 5.33s
INFO: 810 processes: 330 internal, 471 linux-sandbox, 9 worker.
INFO: Build completed successfully, 810 total actions

The previous version produces no warnings for me, though:

Suggested change
bazel_dep(name = "rules_java", version = "8.16.1")
bazel_dep(name = "rules_java", version = "8.16.0")

bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "rules_java", version = "8.16.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Suggested change
bazel_dep(name = "rules_java", version = "8.16.1")
bazel_dep(name = "rules_java", version = "8.16.0")

This fixes various warnings when building with the newest Bazel.
@jwnimmer-tri
Copy link
Contributor Author

I don't see any warnings myself, but I'm happy to stick with 8.16.0. Pushed now.

@nosracd
Copy link
Contributor

nosracd commented Oct 9, 2025

I don't see any warnings myself, but I'm happy to stick with 8.16.0. Pushed now.

Yeah I'm not seeing it on CI either; I wonder if it was specific to the version of Java I was testing locally with or something.

@nosracd nosracd merged commit 1c04dc2 into lcm-proj:master Oct 9, 2025
66 checks passed
@jwnimmer-tri jwnimmer-tri deleted the bump branch October 9, 2025 17:08
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