Skip to content

Migrate from WORKSPACE to Bzlmod#110

Closed
darkrift wants to merge 18 commits intobazel-contrib:mainfrom
darkrift:bzlmod
Closed

Migrate from WORKSPACE to Bzlmod#110
darkrift wants to merge 18 commits intobazel-contrib:mainfrom
darkrift:bzlmod

Conversation

@darkrift
Copy link
Copy Markdown
Contributor

@darkrift darkrift commented May 4, 2025

This migrates from the deprecated WORKSPACE style to bzlmod.

Summary of changes :

  • Use go 1.24.2 instead of 1.18 which is not supported anymore (golang supports only the last 2 major versions for updates)
  • Declare using golang.org/x/tools explicitly in tools.go because it is required for the format script
  • Dependency on go bazel-gazelle in BUILD.bazel files is now provided by the gazelle module itself instead of the go.mod equivalent com_github_bazelbuild_bazel_gazelle
  • Update gazelle from 0.42.0 to 0.43.0
  • Cleanup bazel-diff left over
  • Use java 21 instead of java 11
  • Use precompiled protobuf to save on build time

There are many other go dependencies that could be updated, but they were not directly required for this migration (even the gazelle update is subjective)

I also kept the rules_go dependency repo_name to the old naming to limit the changes and to be closer to the strict minimum for the bzlmod migration.

@darkrift
Copy link
Copy Markdown
Contributor Author

darkrift commented May 4, 2025

There's only the part about build_external that I'm not sure about. Do we still need that ? It didn't trigger that error so far.

Comment thread .bazelrc
@sitaktif
Copy link
Copy Markdown
Collaborator

sitaktif commented May 8, 2025

There's only the part about build_external that I'm not sure about. Do we still need that ? It didn't trigger that error so far.

That references a pretty old issue. If we're not hitting the issue, I see no point in keeping it around 👍

Copy link
Copy Markdown
Collaborator

@sitaktif sitaktif left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@darkrift darkrift closed this May 11, 2025
@darkrift
Copy link
Copy Markdown
Contributor Author

Let's continue in #111

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