Skip to content

merge queue: embarking 2.29-maintenance (8a3d3b2), #13580, #13599, #13594, #13586 and [#13602 + #13592 + #13596 + #13637 + #13641] together#13663

Closed
mergify[bot] wants to merge 19 commits into2.29-maintenancefrom
mergify/merge-queue/20fdd844f9
Closed

merge queue: embarking 2.29-maintenance (8a3d3b2), #13580, #13599, #13594, #13586 and [#13602 + #13592 + #13596 + #13637 + #13641] together#13663
mergify[bot] wants to merge 19 commits into2.29-maintenancefrom
mergify/merge-queue/20fdd844f9

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jul 30, 2025

🎉 This combination of pull requests has been checked successfully and will be merged soon. 🎉

Branch 2.29-maintenance (8a3d3b2), #13580, #13599, #13594, #13586 and [#13602 + #13592 + #13596 + #13637 + #13641] are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of [#13602 + #13592 + #13596 + #13637 + #13641].
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue default for merge:

  • check-success=installer test on macos
  • check-success=installer test on ubuntu
  • check-success=tests on macos
  • check-success=tests on ubuntu
  • check-success=vm_tests
  • any of [🛡 GitHub branch protection]:
    • check-success = installer test on macos
    • check-neutral = installer test on macos
    • check-skipped = installer test on macos
  • any of [🛡 GitHub branch protection]:
    • check-success = installer test on ubuntu
    • check-neutral = installer test on ubuntu
    • check-skipped = installer test on ubuntu
  • any of [🛡 GitHub branch protection]:
    • check-success = tests on macos
    • check-neutral = tests on macos
    • check-skipped = tests on macos
  • any of [🛡 GitHub branch protection]:
    • check-success = tests on ubuntu
    • check-neutral = tests on ubuntu
    • check-skipped = tests on ubuntu

Required conditions to stay in the queue:

---
checking_base_sha: e6d4c5ff62690130d1004276a3d3360f7256a436
previous_failed_batches: []
pull_requests:
  - number: 13602
  - number: 13592
  - number: 13596
  - number: 13637
  - number: 13641
...

xokdvium and others added 19 commits July 30, 2025 11:51
For heavier objects it doesn't make sense to return
a std::optional with the copy of the data, when it
can be used by const reference.

(cherry picked from commit 4711720)
Previous code had a sneaky bug due to which no caching
actually happened:

```cpp
auto linesForInput = (*lines)[origin->offset];
```

That should have been:
```cpp
auto & linesForInput = (*lines)[origin->offset];
```

See [1].

Now that it also makes sense to make the cache bound in side
in order not to memoize all the sources without freeing any memory.
The default cache size has been chosen somewhat arbitrarily to be ~64k
origins. For reference, 25.05 nixpkgs has ~50k .nix files.

Simple benchmark:

```nix
let
  pkgs = import <nixpkgs> { };
in
builtins.foldl' (acc: el: acc + el.line) 0 (
  builtins.genList (x: builtins.unsafeGetAttrPos "gcc" pkgs) 10000
)
```

(After)

```
$ hyperfine "result/bin/nix eval -f ./test.nix"
Benchmark 1: result/bin/nix eval -f ./test.nix
  Time (mean ± σ):     292.7 ms ±   3.9 ms    [User: 131.0 ms, System: 120.5 ms]
  Range (min … max):   288.1 ms … 300.5 ms    10 runs
```

(Before)

```
hyperfine "nix eval -f ./test.nix"
Benchmark 1: nix eval -f ./test.nix
  Time (mean ± σ):     666.7 ms ±   6.4 ms    [User: 428.3 ms, System: 191.2 ms]
  Range (min … max):   659.7 ms … 681.3 ms    10 runs
```

If the origin happens to be a `all-packages.nix` or similar in size then the
difference is much more dramatic.

[1]: https://www.github.com/lix-project/lix/commit/22e3f0e9875082be7f4eec8e3caeb134a7f1c05f

(cherry picked from commit 5ea81f5)
the second equivalence, using a if-else expression, aligns much closer to how most humans think about implication, adding it might help some people :)

(cherry picked from commit 51151c2)
...and also NIX_STATE_HOME in nix-profile.fish. This is directly
translated from the bash scripts and makes the fish scripts equivalent
in functionality to the bash scripts.

Note that nix-profile.fish checks for NIX_STATE_HOME and
nix-profile-daemon.fish does not, so the two scripts are no longer
identical.

(cherry picked from commit 751f50f)
Waiting for the minio unit is apparently not reliable enough, so let's
also wait for the port.

(cherry picked from commit ca96967)
Allows to copy the archive to a remote host and not get

    error: cannot add path '/nix/store/01x2k4nlxcpyd85nnr0b9gm89rm8ff4x-source' because it lacks a signature by a trusted key

(cherry picked from commit 80a4293)
Running parallel nix in nix can lead to multiple instances trying to
create the state directories and failing on the `createSymlink` step,
because the link already exists.

`replaceSymlink` is already idempotent, so let's use that.

Resolves #2706

(cherry picked from commit d64c922)
(cherry picked from commit da76bc0)
@github-actions github-actions bot added documentation new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Jul 30, 2025
@mergify mergify bot closed this Jul 31, 2025
@mergify mergify bot deleted the mergify/merge-queue/20fdd844f9 branch July 31, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants