by RcouF1uZ4gsC · 7y ago · 0 comments
Build systems should be easy to build. Bazel is not by a far shot due to java being a mess in this area (ironic given it being advertised as a cross platform language).
These issues are not important for everyone perhaps. (Heck the entire Kubernetes ecosystem pulls random binaries from docker hub without any cryptographic signatures.) but it's still a shame; especially for a build system.
The part where this starts to suck is when their tools become pseudo-standards and everyone has to live with their decisions.
1. A corporation spends significant resources developing a project.
2. Then they release to allow the public to use it at zero cost. Often they even invest in supporting that external use.
3. The project provides enough value to so many users (who chose it of their own volition) that it becomes nearly a standard.
And this is somehow a bad thing?
Regarding your specific interpretation:
1. The product was developed for internal use AFAIK, then released externally.
2. Google is getting something out of this: a PR boost, better engineer retention and the engineers feel good about themselves.
3. All these projects not only don't become standards, but they just add to the pile of things one has to learn because there are still too many people that are fawning over anything published by FAANG.
Most Google projects are like this, including Android which is the main reason why vendors struggle with os updates.
Android is not a Google's internal product, unlike Bazel.
Currently doing this for BSD using OpenJDK 11.
Irrespective of Bazel, that's an lot of software than can't run on NixOS ARM, including build-related stuff:
* Elasticsearch, Cassandra
* Eclipse, IntelliJ, Netbeans
* Jenkins
* Java toolchain, Android toolchain
> (ironic given it being advertised as a cross platform language
Indeed that is one of Java's hallmark features. Servers, desktops, phones, toasters.
---
FWIW it's not unheard of to require compiling on one platform for another. This is how most of the embedded world works.
Other idea, distributions like Debian, seems to build OpenJDK as well, so maybe that would be a way to get the initial package (through an existing distro) https://buildd.debian.org/status/logs.php?pkg=openjdk-11 - see the armel/armhf/arm64 architectures (arm64 equals aarch64).
That might get you bootstrapped to the point where you can use that to re-compile the community edition of Java.
The command line client as well as some low level file utilities.
But Bazel is distributed as a standalone package in several packaging systems; no need to install Java yourself.
Though I doubt many people know this; there's virtually no reason you would be exposed to its language implementation choices.
EDIT: Actually I believe Bazel is changing its .deb package to not be standalone, in order to comply with Debian requirements.
Um, doesn't it still have a client that starts up a persistent server and you then have to wait for that server to start up (which, being Java, takes forever) and then deal with those server processes hanging around?
That sounds like being exposed to its language implementation choices.
As opposed to, say, having fast start-up times and not using a server design like basically every other build too.
But my information might be out of date. That's what always soured me on it previously, though.
It starts a server for (1) concurrency control (2) management of worker processes some languages use (3) caching the build graph (recall that Bazel works with very large code bases).
These reasons are independent of implementation in C++, Go, Rust, Java AOT, etc.
(And yes it doesn't have to use a persistent process to solve these problems. That is the solution it chooses.)
> not using a server design like basically every other build too
Buck, Pants, sbt, Gradle
How much did the fact that Java is very slow starting up influence the decision to use a persistent process instead of some other solution?
I think the server is kept around for a number of reasons that have nothing to do with Java startup time. Probably the biggest one is file-watching, using inotify, FSEvents, etc.
https://stackoverflow.com/questions/57982028/how-does-bazel-...
Java can be compiled into native binaries using GraalVM. Not to mention you dont actually have to install Java as it comes in bundled.
Bazel-like in many ways; written in Go.
The default install of my dev machine (Ubuntu) installed two different versions of python and perl5, neither of which I use. Other languages have been installed indirectly because I installed one tool or another. As long as the language itself doesn't get in the way (e.g. the tool is picky about the language version and requires extra work to install it) why should I care ?
Plus, even if one does not use them, shipping a minimal runtime is hardly any different from having libc or libc++ dynamically linked.