Live data from Hacker News

Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

news.ycombinator.com

31–38 of 38 posts

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#31
post #3

I've used pants at a small company <10 engineers and worked at a company migrating to Bazel with 200+ engineers. Bazel used to take a dedicated engineer 3-6+ months to bootstrap the full setup (creating the build files, seeing up the Bazel server, updating CI to use Bazel correctly including caching) especially since the docs weren't great from what I remember. I suspect that the time could be cut down by now especia…

Thanks! Do you have any thoughts to share on reasons for the migration to Bazel?

3-6 mo of one engineer to migrate to something so hardcore as Bazel seems very good actually, especially since it seems they Did It Right. The flows in 200-engineer size org can be quite complicated.

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#32

I would stay away honestly! I am ex-Meta and even when I was working at Meta my entire team struggled mightily with Buck despite having access to all our internal resources! When it works you almost forget about all the pain... But then once I took a peek at some of the custom build rules that I was blindly copy pasting and was blown away how complicated it all was. Thousands of lines of build code...

Haha I can totally relate to copypasting a rule and later finding out how it actually worked :)

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#33
post #2

I have tried twice in the past 5 years or so to convert different projects (mostly Java) to Bazel but failed miserably every single time. I do not have notes handy so I don’t remember exactly what happened but my impressions after a week or two invested trying to get it running were a) that our projects had too many unsupported things (dependencies, flows) that would require a huge effort to adapt; and b) that it wou…

> Man, not having to build the same code that hasn’t changed over and over locally and in pipelines sounds so appealing. Can't you use something like Maven build cache ( https://maven.apache.org/extensions/maven-build-cache-extens... ) for that?

I somehow have never seen this. Will try it out, thanks

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#34
post #27
post #17

Also an ex-Googler. At a tiny startup of 4 engineers atm. Briefly looked into Bazel, but settled on pantsbuild since Google seems to have just thrown all the language support over the wall to the community. Being able to trivially setup CI on Github has been very helpful and important to me. Being able to easily add targets and package things that require multiple microservices has been nice. People say you can use t…

Poetry?

Poetry is like 1 of 4 different toolchains that people seem to use for python.

Not to say that it's bad, just that I don't buy that it's meaningfully standard. Though it seems like poetry sees zipapp generation as out of scope, but at least pdm has a plugin.

I briefly tried a bunch of toolchains including poetry to see if anything could handle the horrific pytorch packaging situation, but they basically all had problems with it, so I didn't press it and just left the training code wrapped in docker duct tape.

I am generally quite happy with pants after dealing with all this mess.

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#35
I worked on a project where I used a Google framework that used bazel and it was a terrible experience, even though in the end I made it work. My first approach was to integrate the framework somehow into the build process I was used to (Makefiles, cmake etc), but then quickly found out this was going to be nearly impossible due to the way bazel works, so in the end I had to use bazel to build my project and to be able to add the framework as a dependency. I still had to hack into the framework bazel tree here and there. I lost a lot of time learning the quirks of bazel and in the end it contributed absolutely nothing and instead of bazel, cmake could have been used, a solution most people are familiar with. I think Googlers are generally on some kind of quest where they need to prove how smart they are by inventing all kinds of quirky weird new kind of "wheels" instead of using existing wheels to build a car, which causes problems for people who do not work at Google but are somehow forced to use Google's solutions. I am wondering if Googlers are aware of the fact that by using/inventing these kind of solutions their skill set becomes so specific they can't leave Google anymore.

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#36
I've rarely had worse experience with infra tool in a big company.

Can't imagine this layer of overengineered complexity can boost a startup, but can easily picture how it slow it down.

Your thinking is obviously distorted by some sort of google mentality.

Put your foot back to the real world please.

The world where you have competition, world where people need to get job done quickly.

Not in most technically sofisticated or mathematically cool way to brag about, but quickly and with as little overhead as possible.

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#37
A few years ago, I was involved in a team with less than 10 engineers, we decided to switch to bazel in order to improve the build times, specially the CI runtime.

On the good side:

- bazel forces you to have an acyclic architecture, still, this can feel annoying because every module needs to specify its dependencies.

- bazel does concurrent builds pretty well, optimizing the build times.

On the bad side:

- It took a considerable time to set everything up, we thought to be done but no, there was a weird stuff coming every week and most of the team ended up waiting for the bazel guy to fix it.

- IDE support was poor, in theory, we could just use intellij but most of the times it required help from the bazel-guy, in my case, I got frustrated about the needed maintenance and just accepted that an IDE wouldn't work. - Given the lack of IDE, it means that we couldn't easily execute a specific test from the UI, having to keep notes for the cli.

- In theory, you could use a shared cloud cache so that the builds are very effective but we could never set this up. - talking to engineers from other companies, they admitted that the bazel setup was hard and took a considerable amount of resources, they ended up writing many internal tools to get a effective usage.

Given that you plan to create a startup, do you plan to hire engineers? then, be prepared to the bazel-guy.

Also, as a startup, I bet your code will be small enough that the build times won't be very different with normal build tools.

I'd personally not use bazel unless my company offers a dedicated engineer just to maintain this integration, I think its overkill for small companies.

Re: Ask HN: Anyone using Bazel at startups? or migrated to/away from Bazel?

#38
post #4

Don’t be the Google hire that makes everything complicated. Be prepared to be told no, or to bring a better argument. We use Bazel at work and it’s sufficiently complex to write new rules. I’ve seen NX touted as a more approachable equivalent for smaller teams, maybe check it out?

1000%!

All those things that were so great and wonderful at bigcorp... pretty often turns out they fixed issues that are a decade old and the state of the world has often made them irrelevant. Certainly at startup scale.

Post reply on HN