From 8f055a18982c2c3349e1a818f31013b9941a5ccd Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Thu, 2 Jul 2026 19:36:41 -0400 Subject: [PATCH] fix: Enable bzlmod by default This fallback is intending to check anything higher than Bazel 6, which given that Bazel 6 is quite old, I don't think it's a huge deal to stop considering it at this point (users can always go back to previous releases). At this point, we can just assume bzlmod is on if we don't specifically say one way or the other. This fixes load issues with Bazel 10 dev releases, and we should not need to update this in the future. --- crates/starpls/src/bazel.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/starpls/src/bazel.rs b/crates/starpls/src/bazel.rs index ea280e2d..fa0e9a33 100644 --- a/crates/starpls/src/bazel.rs +++ b/crates/starpls/src/bazel.rs @@ -28,16 +28,7 @@ impl BazelContext { // Check if bzlmod is enabled for the current workspace. let bzlmod_enabled = { - // bzlmod is enabled by default for Bazel versions 7 and later. - // TODO(withered-magic): Just hardcoding this for now since I'm lazy to parse the actual versions. - // This should last us pretty long since Bazel 9 isn't anywhere on the horizon. - let bzlmod_enabled_by_default = ["development", "release 7", "release 8", "release 9"] - .iter() - .any(|release| info.release.starts_with(release)); - - if bzlmod_enabled_by_default { - info!("Bazel 7 or later detected"); - } + let bzlmod_enabled_by_default = true; // Check starlark-semantics to determine whether bzlmod has been explicitly // enabled/disabled, e.g. in a .bazelrc file.