Open
Conversation
Documents the strategy for migrating from WORKSPACE (Bazel 6.2.0) to Bzlmod (Bazel 8.0.0), including MODULE.bazel structure, dependency handling, and verification steps. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All 20 targets build successfully with Bazel 8.0.0. Changes: - Add MODULE.bazel with local path overrides and isolated crate extension - Update .bazelversion from 6.2.0 to 8.0.0 - Update .bazelrc with Bzlmod config and experimental flags - Update BUILD to remove rust_analyzer_toolchain_tools reference (not automatically created by Bzlmod extension, optional for IDE) - Replace migration plan with status document - Add MODULE.bazel.lock for reproducible builds Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove isolate=True from crate extension to share crate types across all TypeDB modules. This ensures type compatibility when typeql is used as a dependency of typedb. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In Bazel 8 Bzlmod, external repos use canonical names with a `+` suffix in the execroot, so the hardcoded `../typedb_behaviour/` path no longer resolves. Use $(rootpath) to let Bazel provide the correct path at build time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
$(rootpath) requires the label to be a direct prerequisite of the rule. The file was only transitively available via the features filegroup, which is insufficient for make variable expansion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Motivation
Update Bazel version from 6.2 to 8.5.1.
The upgrade is done in a backwards-compatible way, such that "upstream" repositories that are yet to be upgraded may depend on this repository. This is done by preserving WORKSPACE and the deps.bzl loader files alongside the new Bazel 8 ones. Once every repository has been upgraded to Bazel 8, these files will be removed.
Implementation
Create MODULE.bazel
The new module declaration is organized into these sections:
Syntactic and rule changes
$(rootpath)to resolve directory of the feature file