Live data from Hacker News

Ask HN: Do we need another build system?

news.ycombinator.com

11–20 of 25 posts

Re: Ask HN: Do we need another build system?

#12
Things I want to be able to do:

1. Use the same build system for C++, Python, Java, Rust, Golang, etc. Any language should easily plug in.

2. I don't want to have to know exactly which g++/javac/cargo/go commands are being run under the hood.

3. I want to build source code and I also want to "build" release packages, docker containers, compressed asset packs, etc. Anything that starts with files and is "compiled" into an output should be expressible.

4. It should understand how testing works. It should be able to abstract "I need to run FooBarTest since I changed FooBar" from me. I just want to know all my tests passed.

4 1/2. We should be able to run tests in other architectures. Something like KVM could be used to start VMs to run tests on arm platforms from a x86 host.

5. I want to know code coverage for my tests in aggregate across all languages.

6. It should be easy to drop into a debugger for a test or binary.

7. I want to be able to zip up my source code, unzip it in 20 years, rerun the build on new computer, and have the build complete regardless of if I have an internet connection or not.

8. I want a package manager that just dumps source code and build instructions into a folder that the build system understands. This way when I open my source tree crosslinks will "just work" and we don't need to implement a new way to obtain source code + docs for every single language in every single IDE.

8 1/2. The package manager should also be able to fetch compilers/toolchains for things. If I want to cross compile all my code for arm and my code is written correctly it should "just work" without me needing to download something special. I shouldn't need to tell someone on windows to install 5 random unix emulation layers just so they can get a windows version of gcc. The package manager should just create a toolchain directory which contains at least bootstrap compilers.

9. It should expose an API so I can write tools that interface with it efficiently. My tools shouldn't care about the underlying language of my code so I can share tools with other people. EX: How many lines of code are in foobar-service? Does ever get called by foobar-service? The build system's API should be general enough for me to implement this.

10. IDEs should take advantage of the build system's metadata and make better autocompletion suggestions.

The closest thing here is the Bazel/Buck/Pants/Please family of build systems but surrounding tooling for these does not exist yet (vendoring source code, package management, VMs for tests). Until we have a build system that supplies these features and is simple to use and supported by IDEs we'll keep getting new build systems.

Re: Ask HN: Do we need another build system?

#15

Things I want to be able to do: 1. Use the same build system for C++, Python, Java, Rust, Golang, etc. Any language should easily plug in. 2. I don't want to have to know exactly which g++/javac/cargo/go commands are being run under the hood. 3. I want to build source code and I also want to "build" release packages, docker containers, compressed asset packs, etc. Anything that starts with files and is "compiled" int…

What's the workflow for "I need to pass one argument to the linker" in the world where your build tool config doesn't even say which compiler it's invoking but your build fails with a bunch of linker errors?

Re: Ask HN: Do we need another build system?

#16

Things I want to be able to do: 1. Use the same build system for C++, Python, Java, Rust, Golang, etc. Any language should easily plug in. 2. I don't want to have to know exactly which g++/javac/cargo/go commands are being run under the hood. 3. I want to build source code and I also want to "build" release packages, docker containers, compressed asset packs, etc. Anything that starts with files and is "compiled" int…

Gradle fits your description pretty closely.

Re: Ask HN: Do we need another build system?

#17

Probably not. We might need new infra automation systems though. The commonly recommended "simple" one, ansible, features an intuitive 22-layer precedence hierarchy.

Ansible should never have become "the standard". It was always obviously flawed (YAML is an abomination for long configuration and templating; ssh doesn't scale). It's only advantage was that it was easy to start with and easy to remove. Why Red Hat decided to buy it and then everyone decided even more to standardise on it is a headscratcher.

Re: Ask HN: Do we need another build system?

#18
Do we need another X??? You could ask the same question about operating systems, file systems, databases, cloud platforms, or programming languages. There will always be someone who is unsatisfied with the status quo and will invent something new in an already established category.

I invented a new kind of database https://www.youtube.com/watch?v=OVICKCkWMZE because I was dissatisfied with existing ones that required you to create many indexes on big tables in order to get reasonable query speeds. That doesn't mean my system will gain instant success over Postgres, MySQL, SQLite, SQL Server, etc.

Re: Ask HN: Do we need another build system?

#20

Things I want to be able to do: 1. Use the same build system for C++, Python, Java, Rust, Golang, etc. Any language should easily plug in. 2. I don't want to have to know exactly which g++/javac/cargo/go commands are being run under the hood. 3. I want to build source code and I also want to "build" release packages, docker containers, compressed asset packs, etc. Anything that starts with files and is "compiled" int…

What's the workflow for "I need to pass one argument to the linker" in the world where your build tool config doesn't even say which compiler it's invoking but your build fails with a bunch of linker errors?

In Bazel parlance you would write a "rule" or setup a "toolchain" which has the linker args passing setup in it. 99% of code does not need a specific linker arg though and optimizing the happy path for letting you do anything, rather than having a simplified flow that most users care about, makes things more confusing.

If you instead had a way to say "this one specific thing I am building is special and needs `$magic_extra_arguments` added to it" and the rest of your code is "normal" things will be pretty good.

Post reply on HN