bazel: Illegal reflective access by com.google.protobuf.UnsafeUtil
After having upgraded Bazel’s protobuf to 3.6.0 and Bazel’s JDK to 9, we are seeing these warnings wen building protobufs. It’s an annoying cosmetic issue.
INFO: From Compiling Java headers src/main/java/com/google/devtools/build/lib/windows/libwindows-hjar.jar (3 files):
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/usr/local/google/home/buchgr/.cache/bazel/_bazel_buchgr/install/e676aae4e6c63bf8d7cfde16175ea874/_embedded_binaries/embedded_tools/tools/jdk/turbine_deploy.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: From Compiling Java headers src/main/java/com/google/devtools/build/lib/libunix-hjar.jar (10 files) [for host]:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/usr/local/google/home/buchgr/.cache/bazel/_bazel_buchgr/install/e676aae4e6c63bf8d7cfde16175ea874/_embedded_binaries/embedded_tools/tools/jdk/turbine_deploy.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
...
Any thoughts @cushon @rongjiecomputer? Can we possibly prevent them from being printed? The corresponding protobuf issue: https://github.com/google/protobuf/issues/3781
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- Quiet more proto/unsafe warnings Fixes #5599 PiperOrigin-RevId: 205794997 — committed to werkt/bazel by cushon 6 years ago
Tried to install tensorflow with Bazel 0.17.2
So it doesn’t seem just cosmetic…