Hacker News new | ask | show | jobs
by zapita 2369 days ago
Go support is not great either. Bazel can build Go just fine, but you will need to throw away the standard Go tooling and use Bazel instead. There are third-party helpers like Gazelle, but you know you’re in for a bumpy ride when even basic operations require a helper.
1 comments

Go support is awesome, IMO. Personally I have favored Bazel over “go build” for a while, except for pure Go projects with no generated sources.

Gazelle is wonderful and it doesn’t belong in Bazel core. Bazel is a build system for every language, and Gazelle is for a subset of Go developers. Since it’s not part of Bazel core, you can always replace it with something else.

But would you recommend using Bazel and Go without Gazelle or an equivalent third party?
I recommend Gazelle for importing third-party Go dependencies but not for your own Go code. If you are using Bazel, just write the BUILD.bazel file yourself with the appropriate go_library / go_binary / go_test rules.
Gazelle is a recommended tool, developed by the same people who make the Go rules. It's not a third party tool, it's part of the normal experience.