Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: build RPK with gazelle #23321

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Conversation

rockwotj
Copy link
Contributor

@rockwotj rockwotj commented Sep 13, 2024

This patchset introduces a set of autogenerated BUILD files that allow us to build rpk with Bazel.

A golang user's guide to bazel:

  • Install bazel via: https://github.com/bazelbuild/bazelisk
  • You can regenerate build files using bazel run //:gazelle, this needs to happen if you modify imports of a package, create a new package or delete an old package
  • Third party dependencies are automatically sourced from go.mod, the only time you need to do anything here is if you add direct dependencies, then you should run bazel mod tidy and it will automatically add third party (direct!) deps to MODULE.bazel, as they must be listed explicitly.

If you have any other questions or concerns about bazel, the team is always available in #p-bazel

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

@rockwotj rockwotj marked this pull request as ready for review September 17, 2024 13:42
embed = [":config"],
data = ["//conf:redpanda.yaml"],
env = {
# NOTE: this is a bit of a hack and rules_go should do this by default
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed an issue here: bazel-contrib/rules_go#4108

They rely on external state that we need to propagate from Bazel.
Copy link
Contributor

@r-vasquez r-vasquez left a comment

Choose a reason for hiding this comment

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

🚀

@rockwotj rockwotj merged commit 886f473 into redpanda-data:dev Sep 17, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants