Update Bazel to 9.2.0 - #166
Open
hartikainen wants to merge 7 commits into
Open
hartikainen wants to merge 7 commits into
hartikainen wants to merge 7 commits into
Conversation
Currently, Reverb passes `py::call_guard` directly to the `episode_steps` property declaration. As explained in [pybind11's upstream change](pybind/pybind11#5533), property declarations silently ignored these guards, and the added compile-time check rejects that usage, preventing the binding from compiling. This PR wraps the `episode_steps` getter in `py::cpp_function` and applies the call guard to that function so that reading the property releases the GIL as intended.
Currently, an op wrapper with no `ops_lib` drops its kernel dependency because operator precedence makes the conditional apply to the entire dependency list. This PR adds parentheses around the optional `ops_lib` dependency so that the generated shared library always links its kernel.
The build helpers currently have two issues: they rely on native rules and pass `depset` values directly to attributes that expect lists of labels. The rule references fail when their built-in or automatically loaded definitions are unavailable, while the dependency arguments cause attribute type errors. This PR addresses both issues by explicitly loading `cc_library`, using the already-loaded `py_library`, and converting the dependency sets to lists.
Currently, downstream Bazel builds do not inherit Reverb's `.bazelrc` flags, which can cause unresolved-symbol linker errors when building macOS shared libraries that depend on symbols supplied at runtime. This PR moves the dynamic symbol lookup setting from the global linker flags to the shared-library targets so that downstream builds receive the required linker configuration.
This PR adds Bzlmod support to the build system. Depends on google-deepmind#162.
As a follow-up to google-deepmind#163, this PR replaces `WORKSPACE`-based builds with Bzlmod. Depends on google-deepmind#163.
With builds using Bzlmod as of google-deepmind#163 and google-deepmind#164, this change upgrades Bazel from `7.7.0` to `9.2.0` and updates the dependency rules and configuration for that version. The Bazel rules use Protobuf `35.1`, while a separate native Protobuf dependency stays at `31.1` for TensorFlow compatibility. Keeping these dependencies separate allows the build rules to advance without changing the native runtime linked with TensorFlow. The dependency patches use the corresponding rule providers and native libraries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With builds using Bzlmod as of #163 and #164, this change upgrades Bazel from
7.7.0to9.2.0and updates the dependency rules and configuration for that version.The Bazel rules use Protobuf
35.1, while a separate native Protobuf dependency stays at31.1for TensorFlow compatibility. Keeping these dependencies separate allows the build rules to advance without changing the native runtime linked with TensorFlow. The dependency patches use the corresponding rule providers and native libraries.