News for hackers. Stuff that matters.
Re:What's in a Build Tool? by xyzzy_plugh on Friday March 04, 2016 @08:18PM (#11227942)
Regarding make, the author states:

  Parallelize different commands: Okay: There's no automatic way to parallelize different targets, though you can still parallelize a single target using Bash.
This is wrong, make has supported the -j flag since 1988:

       -j [jobs], --jobs[=jobs]
             Specifies the number of jobs (commands) to run simultaneously.  If there is more than one -j option, the last one is effective.  If the -j option is given without an argument, make will not limit the number of jobs that can  run
             simultaneously.
Re:What's in a Build Tool? by microcolonel on Saturday March 05, 2016 @03:53AM (#11228926)
I can't believe anyone could use make in the last ~12 years without the -j flag. We've had dual cores at least for ages.
Re:What's in a Build Tool? by oriolid on Saturday March 05, 2016 @01:40PM (#11230412)
I have a co-worker who was told about -j a couple of weeks ago. Before that, he would bill half an hour for every time he did a clean build.
Re:What's in a Build Tool? by Ace17 on Saturday March 05, 2016 @04:22AM (#11228962)
Actually, I think make should default to parallel builds.
Re:What's in a Build Tool? by MereInterest on Saturday March 05, 2016 @05:51AM (#11229118)
The problem there is that it would break makefiles that do not handle their dependencies correctly. With non-parallel builds, the order of execution is deterministic, and so you can get away with sloppiness in your dependencies. If it works the first time that you test it, it will continue to work.

I can understand why they would be hesitant to change the default, as they would rather that old, tested scripts continue to work without modification.

Re:What's in a Build Tool? by _pmf_ on Saturday March 05, 2016 @09:40AM (#11229607)
> The problem there is that it would break makefiles that do not handle their dependencies correctly.

Serious question: In what way are Makefiles that are not specifying their dependencies correctly ever to be considered non-broken?

Re:What's in a Build Tool? by pgeorgi on Saturday March 05, 2016 @10:34AM (#11229722)
As said: their behavior is still deterministic in non-parallel execution.

And it looks like gnu make developers aren't like compiler developers that exploit any ambiguity as an excuse to really mess up somebody's day.

Re:What's in a Build Tool? by MereInterest on Saturday March 05, 2016 @12:42PM (#11230138)
It's the exact same argument that comes up whenever gcc improves their optimization algorithms by exploiting undefined behavior, making some code no longer work. In both cases, the original code was fundamentally broken from the start, and the change in tooling only revealed the brokenness, not causing it.

I would completely see such makefiles as being broken.

Re:What's in a Build Tool? by slavik81 on Saturday March 05, 2016 @01:28PM (#11230350)
The impact of those changes is rather different. In the case of make, your build would probably break. In the case of gcc, your program's behaviour would silently change.
Re:What's in a Build Tool? by MereInterest on Saturday March 05, 2016 @02:01PM (#11230512)
In the case of make, with missing dependencies, it can result in a file not being re-compiled when it should be. If you are compiling C, this can result in the definition of a function definition being different in two different compilation units. When one of those compilation units calls a function defined in the other, your program's behavior breaks. All due to a change in the build tool.
Re:What's in a Build Tool? by slavik81 on Saturday March 05, 2016 @02:45PM (#11230717)
That's true. I qualified my statement with probably because there are exceptions. Protecting against those sorts of errors is why my release candidates are done with a clean build and newly fixed bugs are reverified on that package before release.
Re:What's in a Build Tool? by dllthomas on Saturday March 05, 2016 @12:36PM (#11230123)
Of course, they are broken. If dependencies are specified incorrectly, there will be files that, if modified, do not lead to correct rebuilds.

But that doesn't mean there aren't stable workflows using those broken files that are not sensitive to the brokenness.

Re:What's in a Build Tool? by Ace17 on Saturday March 05, 2016 @01:26PM (#11230341)
This is exactly why it should be the default. Defaulting to parallel builds would stop the epidemy of broken makefiles from growing.

Users of legacy makefiles would have to explicitely use "make -j1", or specify ".NOTPARALLEL:" in the makefile - no big deal.

(As a beneficial side effect, defaulting to parallel builds would create an incentive for fixing sloppy makefiles).

Re:What's in a Build Tool? by abiox on Saturday March 05, 2016 @01:51PM (#11230460)
callously harming existing and long-term users in the pursuit of some narcissistic ideological goal seems risky.
Re:What's in a Build Tool? by hamstergene on Saturday March 05, 2016 @08:03AM (#11229379)
It will also not work with recursive make invocations, e.g. when top level makefile simply invokes makefiles of several independent projects.
Re:What's in a Build Tool? by opk on Saturday March 05, 2016 @02:03PM (#11230529)
This actually works fine in GNU make too. The parent make acts as a job server. The implementation is ingenious, see http://make.mad-scientist.net/papers/jobserver-implementatio...
Re:What's in a Build Tool? by spc476 on Saturday March 05, 2016 @05:49AM (#11229114)
It only works if all the dependencies are specified correctly, otherwise, the make will fail.