←back to thread

392 points mfiguiere | 2 comments | | HN request time: 0.405s | source
Show context
chubot ◴[] No.35476993[source]
The linked paper is pretty interesting, and short at 4 pages.

In plainer language, I'd say the observation/motivation is that not only do compiling and linking benefit from incrementality/caching/parallelism, but so does the build system itself. That is, the parsing of the build config, and the transformation of the high level target graph to the low level action graph.

So you can implement the build system itself on top of an incremental computation engine.

Also the way I think about the additional dependencies for monadic build systems is basically #include scanning. It's common to complain that Bazel forces you to duplicate dependency info in BUILD files. This info is already present (in some possibly sloppy form) in header files.

So maybe they can allow execution of the preprocessor to feed back into the shape of the target graph or action graph. Although I wonder effect that has on performance.

---

The point about Java vs. Rust is interesting too -- Java doesn't have async/await, or coroutines.

I would have thought you give up some control over when things run with with async/await, but maybe not... I'd like to see how they schedule the tasks.

Implementing Applicative Build Systems Monadically

https://ndmitchell.com/downloads/paper-implementing_applicat...

replies(2): >>35477514 #>>35481852 #
1. dbaupp ◴[] No.35477514[source]
Pants v2 supports dependency inference in a manner similar to what you’re hypothesising. It indeed can benefit from the general caching mechanism. https://blog.pantsbuild.org/why-dependency-inference/

It has been remarkably convenient for our Python monorepo.

replies(1): >>35483617 #
2. chubot ◴[] No.35483617[source]
Ah very interesting, I had heard of Pants, but I didn't know about Pants 2. Having less BUILD metadata definitely seems like a big win, and I imagine with some effort you can keep the parallelism/caching/distribution too (I'd be interested in details on that).

Since Pants 2 has a core in Rust, I wonder if you considered Starlark vs. Python? I can see advantages to Python, but it seems like there are good open source implementations of Starlark now.

With Pants 2 and Buck 2, now we're on the 3rd or 4th generation of the Bazel-like systems :)