Live data from Hacker News

Chromium Switching from Ninja to Siso

groups.google.com

51–60 of 73 posts

Re: Chromium Switching from Ninja to Siso

#51
post #43

Earlier quoted context omitted.

Why? Would you compile the compiler from source as well? From what? You need to compile the compiler's compiler from source as well, right? Where does it stop? And why is that location more valid of a decision than the one that doesn't require building the build system from source?

It stops at GNU Mes and hex0. Bootstrapping everything is exactly how it's done correctly--and how it's actually done in practice in Guix. I mean sure if you have a business to run you outsource this part to someone else--but you seem to think it's not done at all. Supply chain attacks have been happening pretty much non-stop the past years. Think it's a good idea to use binary artifacts you don't know how they were…

I didn't realize until I read this, but all software engineers would benefit from building everything from source at least once as an educational experience.

I've never gone all the way to the bottom, but now that I know it's possible I cannot resist the challenge to try it.

Re: Chromium Switching from Ninja to Siso

#52
post #40

Earlier quoted context omitted.

Not really relevant here, but this is actually exactly how it's done in embedded systems like Yocto, everything from gcc, make, etc. is built from source (I believe the host compiler is used in a 3-stage bootstrapping process for gcc). And in these cases you really see the impact of internal dependencies (building rust/llvm takes around 30-40% of the entire build). The upside is that you can patch and debug absolutel…

You mean it’s consistent on the machine code level and this allows patching and debugging more easily? Trying to understand..

I think what they mean is, having all the source code that make up your system as well as building everything yourself, allows you to climb down to any level of the system and adjust the parts as needed, including the compilers and build system. It gives you full control of everything running on the machine.

This kind of control is not commonly seen because most people don't want or need to build it all from source. But it makes sense in some contexts, like for embedded or security critical systems.

Re: Chromium Switching from Ninja to Siso

#53
post #15

Looks like the Google developer in the discussion is clueless.

I just wanted to point out after reading the thread of the Chromium maintainers that it looked to me like they rushed out this change without proper consideration of all possible implications. Other comments there show that the developer isn’t intimately familiar in depth with the Chromium project at large, yet making changes with very wide impact. I apologize if anyone got me wrong, especially if there are any Googler here that took this personally.

Re: Chromium Switching from Ninja to Siso

#54
post #18
post #9

Earlier quoted context omitted.

To be fair, Bazel didn't exist when Chrome started.

Even so, a build system migration of any kind being anything other than Bazel given the design goals of Bazel and the heritage of Chrome is an implicit indictment of Bazel itself. I say this as a fan of Bazel.

Most likely Chromium needs to build on a system which doesn’t support Java. Like ChromeOS. That excludes Bazel, at least unless cross-compilation is supported (likely a monstrous headache for ChromeOS). It’s a good reason to rewrite Bazel in Rust.

Re: Chromium Switching from Ninja to Siso

#55
post #54
post #18

Earlier quoted context omitted.

Even so, a build system migration of any kind being anything other than Bazel given the design goals of Bazel and the heritage of Chrome is an implicit indictment of Bazel itself. I say this as a fan of Bazel.

Most likely Chromium needs to build on a system which doesn’t support Java. Like ChromeOS. That excludes Bazel, at least unless cross-compilation is supported (likely a monstrous headache for ChromeOS). It’s a good reason to rewrite Bazel in Rust.

ChromeOS is Gentoo based.

It doesn't have any compiler in the distribution itself

Re: Chromium Switching from Ninja to Siso

#56
post #38
post #32

Another NIH build tool? Never heard of it, and ninja is the only way to build C++20 modules alongside CMake. Then again, that is something that Chromium probably will never bother with.

Wasn't ninja invented by a Google employee?

Sure, but only that team gets to put “designed and implemented new build system” on their resume. See how many meet/hangout/alo variants came out of Google. In companies of that size the “here” in NIH is a lot more localized to smaller units.

Re: Chromium Switching from Ninja to Siso

#57

They've added a dependency on Go with the addition of siso.

How so? you don't need the go build toolchain installed to use Go binaries.

For example, many Linux distributions want to compile everything in their main repositories from source, all the way down. There are comments as such in response to the mailing list announcements. Your average Linux distribution probably had Go available, but it previously wasn't on the critical path of anything.

Re: Chromium Switching from Ninja to Siso

#58

Earlier quoted context omitted.

How so? you don't need the go build toolchain installed to use Go binaries.

For example, many Linux distributions want to compile everything in their main repositories from source, all the way down. There are comments as such in response to the mailing list announcements. Your average Linux distribution probably had Go available, but it previously wasn't on the critical path of anything.

I can’t imagine that Go is missing on any distribution that ships Chromium anyway.

This new dependency should not really be an issue.

Re: Chromium Switching from Ninja to Siso

#59
post #55
post #54

Earlier quoted context omitted.

Most likely Chromium needs to build on a system which doesn’t support Java. Like ChromeOS. That excludes Bazel, at least unless cross-compilation is supported (likely a monstrous headache for ChromeOS). It’s a good reason to rewrite Bazel in Rust.

ChromeOS is Gentoo based. It doesn't have any compiler in the distribution itself

I’ll wager if you try to emerge a JVM on ChromeOS, especially on ARM32, it will fail. Gentoo is… not great.

Re: Chromium Switching from Ninja to Siso

#60

Note that Siso uses Starlark ( https://chromium.googlesource.com/infra/infra/+/refs/heads/m... ) which is the build language of Bazel I wonder if the end goal is to use Bazel for Chromium and Siso is an incremental step to get there

A handful of other areas are configured using Starlark in chromium. This particular use is in a very different capacity than Bazel - the Bazel equivalent in chromium is GN, and I have not seen any signs that GN will be replaced any time soon.

GN at least used to generate Ninja files. So I suppose now it will be generating Siso files?

edit: asked and answered, Siso is a "drop-in" replacement for Ninja, so presumably it can read .ninja files, and so GN probably didn't need to change much to accommodate it.

Post reply on HN