bazelbuild / examples

Examples for Bazel
http://bazel.build
Apache License 2.0
840 stars 515 forks source link

Examples for new Bazel tutorial in Go #519

Closed jayconrod closed 1 month ago

jayconrod commented 1 month ago

Examples for bazelbuild/bazel#23958

meteorcloudy commented 1 month ago

Should we add Bazel version file for those?

jayconrod commented 1 month ago

Should we add Bazel version file for those?

Done

Maybe you want to update the CODEOWNERS file in the first PR so you have someone more "local" to do the follow-up reviews? Helped me a lot in the frontend folder

I don't have write access to this repo, so I don't think CODEOWNERS would allow me to be listed. Happy to review changes of course, just @ me.

meteorcloudy commented 1 month ago

Can you please rebase to get https://github.com/bazelbuild/examples/pull/524?

jayconrod commented 1 month ago

Yes, rebased.

alexeagle commented 4 weeks ago

Hey @jayconrod great to see you working on this - I was a reviewer for https://bazel-contrib.github.io/SIG-rules-authors/go-tutorial.html by @chrislovecnm (git history at https://github.com/bazel-contrib/SIG-rules-authors/commits/gh-pages) Should that tutorial be removed or updated to reflect what you're working on?

jayconrod commented 4 weeks ago

@alexeagle Ah, I hadn't seen that tutorial. It seems like these have slightly different goals and audiences, so it's fine for them both to continue as they are.

This new tutorial is meant to be an introduction to Bazel that happens to be in Go. I think it's important to have introductory tutorials covering in a few different languages so people can build a mental model of what Bazel does from the tools they're familiar with. So this tutorial covers build files, label syntax, and just enough bzlmod to import rules_go..

Chris Love's tutorial feels a bit broader to me since it covers Gazelle, Bazelisk, external dependencies in WORKSPACE, and some configuration specifics of rules_go. That's all valuable stuff to cover, though since it's language specific, I think it needs to be more discoverable starting from rules_go and Gazelle.