Live data from Hacker News

Bazel 1.0

opensource.googleblog.com

191–200 of 204 posts

Re: Bazel 1.0

#191

Bazel, the tool, is fantastic. Haven't had a better build tool that I've seen yet. The build rules are awful. Almost every single rule is broken in some catastrophic way and, as is typical with Google open source, it is very difficult to ask for things to either be fixed or designed differently. Major examples: rules_python flat out does not work for python 3, rules_docker does not work without python 2, rules_proto…

This has improved lately. Rules_docker's image pusher has been replaced with a copy written in Go. This pusher is built using rules_go, so that it does not rely on any host tooling.

I'll have to update my tag and try again. I wish it could just use my docker daemon which likely already had the image and layers.

Re: Bazel 1.0

#192

I only wish Bazel had been written in a language that produced native binaries like C++ or Go instead of Java. It seems like a waste for me as a non-Java developer to install Java on my dev machine just for Bazel.

We didn't have Bazel on ARM for NixOS because we can't bootstrap openJDK on ARM. There's no source code for a JVM that compiles on ARM afaik. Though in theory we could package binary blobs from oracle and bootstrap JDK and Bazel from there, it means now our trust path for your critical build tool has a random Oracle blob in its trust path there that is extremely hard to get rid off. Build systems should be easy to bu…

Can't you bootstrap older openJDK with (now discontinued) GCJ?

Re: Bazel 1.0

#193
post #95

Earlier quoted context omitted.

> (And yes it doesn't have to use a persistent process to solve these problems. That is the solution it chooses.) 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?

My guess is that startup time is not the issue, but loading a large data structure (its cache) from disk can be. Especially if you can't or don't want to use memory mapping because it's hard to do well. But more importantly, I think that the server can monitor file changes ahead of time with things like inotify, saving the time of stat()-ing files when the user wants to perform a build.

Change monitoring with inotify is going to hit limits quickly.

I recently wanted to take a look at VSCode and it immediately shat itself over the maximum number of inotify watches being too low (the kernel I'm running restricts this to 8k for non-root users).

I then bumped the limit to the max (512k, I think, or about 7 copies of linux.git)…still no luck. Now imagine you have a Google-scale number of files.

Re: Bazel 1.0

#194

Earlier quoted context omitted.

Why do you even have Bitdefender installed?

A lot of people have it for compliance reasons.

A lot of regulations are actually a lot more reasonable than one might think and refrain from mandating any specific technical measures.

Yet, people always seem to point to regulations to justify all kinds of snake oil salesmen garbage, even if obviously unfit to fulfill the stated objective.

Re: Bazel 1.0

#195

I only wish Bazel had been written in a language that produced native binaries like C++ or Go instead of Java. It seems like a waste for me as a non-Java developer to install Java on my dev machine just for Bazel.

Bazel has been embedding Java for a year or so now. There's no need to concern the host environment with installing the JRE anymore. As a user, the fact that Bazel is written in Java is transparent.

Re: Bazel 1.0

#196
post #81

Earlier quoted context omitted.

Google builds stuff for themselves and then dumps it for extra reputation points on the dev community. The part where this starts to suck is when their tools become pseudo-standards and everyone has to live with their decisions.

I'm biased because I work at Google on an open source project, but the complaint here seems to be: 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 th…

The complaint is that the tech mega-corps are too big and should be broken up. Then they wouldn't distort markets (among other things) by dumping free products subsidized through ads on them, only to forget about said products two years later.

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.

Re: Bazel 1.0

#197

I only wish Bazel had been written in a language that produced native binaries like C++ or Go instead of Java. It seems like a waste for me as a non-Java developer to install Java on my dev machine just for Bazel.

We didn't have Bazel on ARM for NixOS because we can't bootstrap openJDK on ARM. There's no source code for a JVM that compiles on ARM afaik. Though in theory we could package binary blobs from oracle and bootstrap JDK and Bazel from there, it means now our trust path for your critical build tool has a random Oracle blob in its trust path there that is extremely hard to get rid off. Build systems should be easy to bu…

This was true for a long time, but we do actually have a bootstrapped openjdk for arm since a few months: https://github.com/NixOS/nixpkgs/pull/65247

Re: Bazel 1.0

#198

I only wish Bazel had been written in a language that produced native binaries like C++ or Go instead of Java. It seems like a waste for me as a non-Java developer to install Java on my dev machine just for Bazel.

I guess that's why they use "gn" in newer projects like Fuchsia or Chrome?

Re: Bazel 1.0

#199
post #81

Earlier quoted context omitted.

Google builds stuff for themselves and then dumps it for extra reputation points on the dev community. The part where this starts to suck is when their tools become pseudo-standards and everyone has to live with their decisions.

Right. Like the v8 javascript engine. If you want to build it, you need to download gigabytes of sources and install Googles internal build system tools first...

yes, and often lots of prebuilt build tools no one really knows how to build from source. It's a real mess open source.

Re: Bazel 1.0

#200
post #29

I only wish Bazel had been written in a language that produced native binaries like C++ or Go instead of Java. It seems like a waste for me as a non-Java developer to install Java on my dev machine just for Bazel.

You don't need to install Java. It's bundled. In fact I'd recommend that you don't even install Bazel itself. Instead, install this: https://github.com/bazelbuild/bazelisk . This will install either the latest Bazel for you automatically, or you can pin a version of Bazel you want in each repository, to limit and control build system churn.

It's funny how Java people always marketed Java as "write once, run everywhere" and they often bundle compatible platform-dependent JRE with platform-specific plugins. ^_^
Post reply on HN