Skip to content

Migrate from WORKSPACE to Bzlmod (take2)#111

Merged
sitaktif merged 1 commit intobazel-contrib:mainfrom
darkrift:bzlmod_take2
May 12, 2025
Merged

Migrate from WORKSPACE to Bzlmod (take2)#111
sitaktif merged 1 commit intobazel-contrib:mainfrom
darkrift:bzlmod_take2

Conversation

@darkrift
Copy link
Copy Markdown
Contributor

@darkrift darkrift commented May 11, 2025

This migrates from the deprecated WORKSPACE style to bzlmod (take2).

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 11, 2025

I created this one to replace #110. The number of commits is reduced to 1 instead of going over a git merge/force push process on the other attempt.

@sitaktif sitaktif merged commit d9f17b3 into bazel-contrib:main May 12, 2025
1 check passed
@sitaktif
Copy link
Copy Markdown
Collaborator

Thanks @darkrift 👍

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