From 0e198ad482e8c19e371c7ad828e08a90815d62a0 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 13 May 2025 04:31:34 +0000 Subject: [PATCH] scripts/update: relax note on parallelism now that nixpkgs-bootstrap updates are atomic --- scripts/update | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/update b/scripts/update index dfb8008ff..650765efc 100755 --- a/scripts/update +++ b/scripts/update @@ -1,14 +1,10 @@ #!/usr/bin/env nix-shell #!nix-shell -i bash -p findutils -p git -p nix-update -# each update job has to do an entire nix eval, which can be memory intensive; be careful when tuning this -# N.B.: not all update jobs are actually independent! naive parallelism like this *will* result in -# failed/partial updates, e.g.: -# 1. `sane.nixpkgs-bootstrap.master` is being updated: this breaks eval of _all_ other attributes. -# 2. `sane.otherPackage` is being updated: its updateScript fails to eval `sane.otherPackage.src`, -# however this would eval if job 1 and 2 were serialized. -# -# TODO: perform parallel updates in some way that the update scripts don't interfere with eachother. +# each update job has to do an entire nix eval, which can be memory intensive; be careful when tuning this. +# N.B.: not all update jobs are atomic; parallel updates _may_ cause failed updates if eval of some package `pkgFoo` +# depends on the `src` field of some library `libBar`, and the two are updated simultaneously. +# this typically only happens when `libBar` is nix code, and `import`'d. PARALLELISM=8 SELF_PATH=$PWD/$0