3 ms·
I’ve not got specifically what you’re describing but I’ve encountered Bazel twice in my career - both in very large Java/Scala/Go code bases (distinct repo for
by rufius 4y ago
I’ve not got specifically what you’re describing but I’ve encountered Bazel twice in my career - both in very large Java/Scala/Go code bases (distinct repo for Go but a lot of code).
Bazel is extremely underwhelming. I’ve worked with crusty ancient systems that built huge systems and Bazel is just the most clown shoes build tool in comparison.
Something didn’t work? Try typing the same command repeatedly and hope that this time it sticks. Multiple commands to achieve a seemingly straightforward task? Why isn’t there a single one that will get us there.
FWIW - I suspect like most tools that Google open sources, the tool makes far more sense in the context of Google’s systems and architecture. If you’re adhering to that, it’s probably coherent.
I’d never choose it willingly though.
- rfoo 4y ago> Multiple commands to achieve a seemingly straightforward task? Why isn’t there a single one that will get us there. Could you elaborate on this? I seldomly need commands beside `bazel build`, `bazel test` and `bazel run` and am curious to your story.
- rufius 4y agoFull admission - I don’t own or have responsibility for how the build system I work with is setup. I’m on parental leave so details are fuzzy but roughly: - run Bazel build - expect dependencies to be built - they weren’t built - run Bazel build again - something else decides to be built - repeat ad nauseum This is within the same project directory, etc. It’s entirely possible that the project is setup in some pathological way but I’ve encountered this enough times in two companies that it’s stuck in my head.
- rfoo 4y agoWhoa, that's tough. Sounds like you have indeed hit a case where > the tool makes far more sense in the context of Google’s systems and architecture Bazel should not behave like what you described (at least in my experience) for in-repo sources and build rules. Except that the world does not work in this way, so they added a duct tape called "using workspace rules to fetch and potentially build external dependencies", which is as fragile as a ./build.sh pulling in all your dependencies. And Google? They did vendor everything they use at //third_party in their monorepo, so (╯‵□′)╯︵┻━┻
- mattnewton 4y agoThis sounds highly broken somehow. Bazel’s raison d'etre is rebuilding only the necessary dependencies. Maybe this is a case of someone trying to force-fit a process that doesn’t look like bazel’s opinions with some custom rules that break it at the core? Pretty much all my bazel/blaze experience has been at google or in other side projects built from the start with bazel, but I have never encountered anything like that. The only complaints I’ve had is that building python slows the scripting loop, and that for side projects without google’s build infrastructure the rebuild-the-world-at-head-from-source method can get very expensive. But this sounds really unfortunate and nothing like the tool I’ve used :/
- Difwif 4y agoThat sounds like some one hacked up an existing project into Bazel without resolving the opinionated differences. I've worked on Bazel projects at multiple companies and I've seen things go off the rails like that a couple times before someone that actually understands the tool rewrites the problematic build process. It's usually some nasty stuff where someone tried to work outside of Bazel because they didn't understand it and created a bunch of impedance mismatches. New people doing this instead of the "right way" is the most valid criticism of Bazel IMO. Sounds like you're working in the worst of both worlds right now.