Live data from Hacker News

Launch HN: Moonrepo (YC W23) – Open-source build system

news.ycombinator.com

161–170 of 176 posts

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#161
post #87

Earlier quoted context omitted.

Based on everyone's feedback about YAML (we didn't expect this much), we'll probably reconsider this!

Glad to hear it! To synthesis my comment down (because it's easier once I've written it once, poorly): The complexity you see in Bazel/Buck/Pants build files may seem like a result of their decision to use a programming language. That's a red herring. That complexity is fundamental to the problems people need to solve to build software. If you remove the ability to solve it in your build system the complexity will mo…

+1

Glad someone else brought up this topic and phrased it way better than I ever could have!

This other comment further down puts it very well, too: https://news.ycombinator.com/item?id=34892724

> If you remove the ability to solve it in your build system the complexity will move to other systems.

Adding to this: I think one of the main limitations of purely declarative (e.g. YAML-based) configurations is that a declarative DSL (as opposed to an imperative DSL) means you (only) get to use config options the inventors of the config language have thought of and implemented (i.e. "defined"). You cannot put into words things that require vocabulary that doesn't exist in your language.

Meanwhile, an imperative language gives you the ability to define on your own what you would like the machine to do.

As an example, consider Gitlab CI configs (YAML-based) or Ansible playbooks. In both cases, once you hit the boundaries of the DSL spec (which, in my experience, typically happens on day one) you can't do anything other than 1) give up or 2) leave the realms of the DSL and as you say,

> move [the complexity] to other systems

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#162
post #128
post #73

Earlier quoted context omitted.

Look at https://moonrepo.dev/docs#supported-languages They only fully support Javascript. The complex stuff, like defines, C++ toolchain, dynamic libs, etc.. is all out of scope.

Wow true. Claiming to be a build system yet being limited to JS... Apparently, the legions of JS developers think the web is the only thing that exists today.

We'll get there eventually! Adding support for other languages in Rust is a very long process.

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#163

Earlier quoted context omitted.

> Does it enforce hermecity or deterministic builds or give me tools to accomplish it? I wouldn't say moon is hermetic, nor are we trying to be. We don't use the sandbox approach for tasks, and run against the original files. For the languages we support, this works best. As for deterministic, we try to be. We have a "toolchain" where we download languages/tools in the background, and run tasks using these tools. Thi…

How do you target large codebases then? The whole point of hermeticity is to allow you to reliably not rebuild and test everything on every commit which is the issue most large codebases have. Also a bit disingenuous to describe it as language agnostic if it only really works with non-compiled languages.

moon will only run on affected projects, so you're not building/testing everything. This is done through a combination of hashing + caching.

It's also language agnostic because you can technically run anything through moon, but support may vary. https://moonrepo.dev/docs/faq#can-we-run-other-languages

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#164
post #59

Earlier quoted context omitted.

Nx is hot garbage imo. Buggy, overly verbose, inflexible, poorly documented, and I'm dubious about their peer review process. If I don't need build caching I'm not using any tool but PNPM and its workspace toolset - that's literally all most people need for a monorepo. I've looked into Turborepo, and its simplicity versus Nx is a strength. However, it's not the taskrunner that I want. I now work in a monorepo where b…

Nx is a pita (imo). I have had amazing success with rush and pnpm.

Should give moon a try if you ever have free time :)

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#165

Came in here to say that Miles is an absolute fucking unit of an engineer / thinker. We just adopted Moonrepo at Gallery and it's been excellent. He's felt the pain of other tools (bazel, nx, turborepo). So happy to see this launch on the front page

<3

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#167

Earlier quoted context omitted.

How do you target large codebases then? The whole point of hermeticity is to allow you to reliably not rebuild and test everything on every commit which is the issue most large codebases have. Also a bit disingenuous to describe it as language agnostic if it only really works with non-compiled languages.

moon will only run on affected projects, so you're not building/testing everything. This is done through a combination of hashing + caching. It's also language agnostic because you can technically run anything through moon, but support may vary. https://moonrepo.dev/docs/faq#can-we-run-other-languages

> moon will only run on affected projects, so you're not building/testing everything

But you can only reliably know what is affected through hermeticity.

> It's also language agnostic because you can technically run anything through moon

That's just calling out to another build system though. I don't think it really counts.

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#168
post #12
post #6

I'm not a lawyer, but given that monorepo was in use in the versioning/build space long before launch, I would have been hesitant to launch with a name where it's going to be an uphill battle to enforce trademark. (I also worked for Google a while back, and they were very conscious about not using Google as a verb internally, losing a slow battle against the tide of trademark dilution.)

It took me three readthroughs to notice as well, but the name is actually `moonrepo` not `monorepo`.

try googling for it... spell check autocorrect is killing it.

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#169
post #39

IMHO, if you're targeting the Javascript ecosystem, this area is already fairly crowded, with Turborepo, Nx and various open source tools providing various degrees of functionality (Bazel, Pants, Lerna, etc) already competing in the space. I'm a tech lead for the web monorepo at Uber. We talked to the Turborepo guy a few years ago, and he admitted that he wasn't sure if it could handle our scale in terms of all the b…

We agree. We weren't happy with all of the current solutions, at least in the JavaScript space. In regards to build graph invalidation, we attempt to hash pieces at the granular level. This includes per file content hashing, and for dependencies (those in `package.json`), we parse the lockfile and extract the resolved version/integrity hashes. We can probably improve this further, but this has been working great so f…

Can you summarize Moon's sandboxing approach? I understand for phantom deps you want to delegate to pnp/pnpm. But how do you handle sources not declared explicitly as inputs to a build graph node?

If I have package A only list its own sources as inputs, how do you prevent the Node runtime from happily doing require('../B')? If you don't, how do you prevent differences in the state of B from poisoning the remote cache?

Re: Launch HN: Moonrepo (YC W23) – Open-source build system

#170

Earlier quoted context omitted.

I wouldn't call it a bazel-like, per-se, but Nix seems to have tamed C++. I don't think it was easy, though.

As I understand it Nix can do hermeticity on a project level, but not on a build step level like you would need for actual development. So it's good for building OSes. Not for building software products.

I agree they target slightly different use cases, but I don't think that's a good excuse for why bazel can't be more hermetic out of the box.
Post reply on HN