News for hackers. Stuff that matters.
Re:Building Uber’s Go Monorepo with Bazel by msoad on Thursday May 14, 2020 @11:14AM (#23180502)
Coordinating this sort of change in a large org like Uber is not entirely "hacking on cool tech". It's a lot of communication and writing documents and going to meetings
Re:Building Uber’s Go Monorepo with Bazel by chimeracoder on Thursday May 14, 2020 @11:21AM (#23180598)
> Coordinating this sort of change in a large org like Uber is not entirely "hacking on cool tech". It's a lot of communication and writing documents and going to meetings

And a lot of tearing your hair out when trying to use tools in the ways that they weren't intended to be used.

Of all languages, Go is not the language where you want to be doing things against the grain (that is, against the way the language designers intend it to be used). Some people like that about Go, and some people don't. Either way, Go is a very opinionated language with a very opinionated ecosystem, and ignoring those is a recipe for frustration.

Last time I checked, Bazel was not recommended by the Go developers - and with good reason: there are a lot of gaps in rules_go/Gazelle, which this blog post alludes to but glosses over. While Google uses Blaze internally, Blaze is not Bazel, and the differences are very apparent to anyone who has used both to build Go specifically. Furthermore, rules_go was developed entirely independently of the Blaze ruleset that Google uses internally, so it's a tool that's not actually used internally at Google, but also not used by the majority of the non-Google Go developer community either, in addition to not being recommended by the Go team at Google[0].

[0] There is exactly one mention of Bazel on the entire golang.org domain - in a changelog from over two years ago, in an /x/ package, where Bazel is mentioned as one of two build systems in a "such as" clause that the new package could potentially enable support for (/x/ packages are considered experimental and not subject to the same backwards compatibility or maintenance guarantees as the rest of the project).

Re:Building Uber’s Go Monorepo with Bazel by jeffbee on Thursday May 14, 2020 @11:34AM (#23180779)
Having used both for years I honestly have not perceived the difference between blaze and bazel go_binary/go_library/go_test. What's the big difference?
Re:Building Uber’s Go Monorepo with Bazel by parsnips on Thursday May 14, 2020 @11:33AM (#23180765)
From the issues I've read on github, anecdotally, is that the approach of the gazelle and rules_go teams is to leverage the standard go tooling and not make changes to go itself.

Also anecdotally, bazel and golang work really well together IME. The community seems pretty active, and the upsides of using gazelle/bazel with golang seem to outweigh any downsides (though I'd be hard pressed to name a downside, that isn't inherit to golang itself).

Re:Building Uber’s Go Monorepo with Bazel by chimeracoder on Thursday May 14, 2020 @11:36AM (#23180800)
> Also anecdotally, bazel and golang work really well together IME... and the upsides of using gazelle/bazel with golang seem to outweigh any downsides

This is really not my experience from having used Bazel with Go for the last four years. But I'm happy you are are apparently not running into issues.

Re:Building Uber’s Go Monorepo with Bazel by parsnips on Thursday May 14, 2020 @11:41AM (#23180855)
I've been using about the same amount of time. Have you tried using python and bazel? Now there's some real weeping and gnashing of teeth ;) Lot's of bad code depending on python == python2 type of non-sense.
Re:Building Uber’s Go Monorepo with Bazel by lhorie on Thursday May 14, 2020 @01:17PM (#23182314)
Javascript is another target that is just about as gnarly. The node module resolution algorithm is reimplemented a million similar-but-not-quite-the-same-ways by popular packages, most of which struggle dealing w/ symlink-heavy codebases (like bazel sandboxes).
Re:Building Uber’s Go Monorepo with Bazel by malandrew on Thursday May 14, 2020 @12:19PM (#23181383)
> Either way, Go is a very opinionated language with a very opinionated ecosystem

except when it comes to dependency management

Re:Building Uber’s Go Monorepo with Bazel by 18nleung on Thursday May 14, 2020 @11:23AM (#23180628)
We're not at the scale of Uber yet, but at Jupiter (YC S19) we're using tech like Bazel, protos, and Kotlin to prepare us for when we are: https://starship.jupiter.co/jupiter-stack/

We're actively hiring for a senior SWE right now, so feel free to shoot me a note if you're looking.

Re:Building Uber’s Go Monorepo with Bazel by novok on Thursday May 14, 2020 @01:41PM (#23182736)
Protos is more of a faster & smaller network serialization tradeoff vs. ease of development thing than a company scale thing. And a thing to do if you want to integrate with gRPC.

I worked at a company that used protos from day one for example.

Many large companies are still using JSON w/ schemas as their network serialization layer just fine.

Re:Building Uber’s Go Monorepo with Bazel by yuribro on Thursday May 14, 2020 @11:38AM (#23180820)
I'm not familiar with the Kotlin build chain, but what role does Bazel play? Is it needed for integration with the protocol buffers?
Re:Building Uber’s Go Monorepo with Bazel by 18nleung on Thursday May 14, 2020 @11:42AM (#23180867)
Yes - Bazel has excellent protobuf integration compared to other build tools (we were originally using Gradle). We're compiling Kotlin to the JVM, so the build chain is similar to Java's.
Re:Building Uber’s Go Monorepo with Bazel by eleventigers on Thursday May 14, 2020 @08:54PM (#23187637)
Gradle has a great protobuf plugin, what is so not excellent compared to Bazel?
Re:Building Uber’s Go Monorepo with Bazel by save_ferris on Thursday May 14, 2020 @11:20AM (#23180591)
This. It's very easy to forget about the political processes involved in making projects like this happen. Also, getting a job at a company as big as Uber in no way guarantees you'll be able to work on tech like this. You'd need to make sure you're joining a team close to this project, and if the culture of team turns out to be toxic, the fun of working on "cool" tech fades really, really fast.