Re: [Nix-dev] parallel make

2015-01-26 Thread Peter Simons
Hi Michael,

  I would sometimes [like to] try to build my system with maximum
  parallel building enabled just to record what breaks this time.

yes, it would be great if that were possible.

As of today, the only way to enable parallel building for all packages
is to override the default for enableParallelBuilding in the generic
builder, but if you do that you'll end up with a different stdenv. That
is unsatisfactory.

If /etc/nix/nix.conf would offer an option to determine the default
value of enableParallelBuilding, then we could have the best of both
worlds. By default, parallel building would be enabled only for those
packages that explicitly request it. For the purposes of testing and
development, however, one could flip the switch and have parallel
building enabled for all packages that don't explicitly disable it.

In other words, users would be able to switch between opt-in and
opt-out.

Best regards,
Peter

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] parallel make (was: Again: Why don't these people havecommit access)

2015-01-21 Thread Vladimír Čunát

On 01/21/2015 01:17 AM, Marc Weber wrote:

I think we have a documentation issue. There should be flag such as:

   parallelBuildingPossible = yes/sometimes/no;


Yeah, well, I personally leave ``enableParallelBuilding = false;`` if I 
find it could fail. We could just e.g. have a more aggressive option 
that would use parallel make unless ``enableParallelBuilding = false;``.


Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] parallel make (was: Again: Why don't these people have commit access)

2015-01-20 Thread Peter Simons
Hi Michael,

  To find out if a makefile is parallel-safe, we need to try it with
  parallel building enabled. This can only be done package-per-package,
  I cannot quickly build everything with parallel builds on and then
  blacklist what fails.

the rationale behind that choice is that you cannot easily tell whether a
package compiles with parallel make jobs enabled or not. Under-specified
make dependencies lead to race conditions, and these may or may not screw
up your build. Whether an unsafe build actually fails depends on any
number of factors that influence the order in which make schedules the
jobs. You can -- in general -- not enable parallel building, run the build
once, and conclude that it's safe! The number of false positives is going
to be large.

Because of this situation, many NixOS contributors preferred the opt-in
solution that we have today. The aim of that the double opt-in is *not* to
maximize the number of builds that run with parallelism enabled, it is to
minimize the number of non-deterministic failures that someone has to
debug and worry about.

Best regards,
Peter

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] parallel make (was: Again: Why don't these people havecommit access)

2015-01-20 Thread Marc Weber
How complicated is it to override mkDerivation in nixpkgs passing
  parallelBuilding = true ?

I think we have a documentation issue. There should be flag such as:

  parallelBuildingPossible = yes/sometimes/no;

instead of parallelBuilding = true.

Then Michale Raskin's tests would not fail on packages which are known
to not build correctly ...

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev