1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 13:06:01 +01:00
Commit graph

21542 commits

Author SHA1 Message Date
Jörg Thalheim
d692729759
Merge pull request #13212 from pbsds/lexical-illusions
docs: remove repeated "allowedReferences" and other lexical illusion
2025-05-16 16:59:23 +02:00
Eelco Dolstra
9088d5b525 Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29 2025-05-16 12:53:24 +02:00
Eelco Dolstra
c20642ac7b Merge remote-tracking branch 'origin/2.29-maintenance' into detsys-main 2025-05-16 12:48:44 +02:00
Jörg Thalheim
041d2374dd
Merge pull request #13213 from pbsds/deriving-path-encoding-anchor
docs: fix duplicate anchor
2025-05-16 11:28:31 +02:00
Peder Bergebakken Sundt
4c50cf798e docs: fix duplicate anchor
`#deriving-path-encoding` is defined in two places, I _think_ this is the correct one to change.
2025-05-16 10:27:29 +02:00
Peder Bergebakken Sundt
ea5302c4a2 docs: remove lexical illusions detected with write-good
I made this this non-markdown aware tool somewhat behave with some cursed fd+pandoc invocations
2025-05-16 09:52:19 +02:00
Peder Bergebakken Sundt
cb16cd707c docs: remove repeated "allowedReferences"
This is what write-good lints as a "lexical illusion"
2025-05-16 09:20:55 +02:00
John Ericson
b21fc05047
Merge pull request #13211 from xokdvium/pos-table
libexpr: Actually cache line information in PosTable
2025-05-16 00:37:57 -04:00
Sergei Zimmerman
5ea81f5b8f
libexpr: Actually cache line information in PosTable
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]: 22e3f0e987
2025-05-15 23:07:25 +00:00
mergify[bot]
f51b537239
Merge pull request #13210 from NixOS/mergify/bp/2.29-maintenance/pr-13207
dev-shell: Drop bear dependency (backport #13207)
2025-05-15 22:32:16 +00:00
Sergei Zimmerman
4711720efe
libutil: Add LRUCache::getOrNullptr
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.
2025-05-15 22:28:41 +00:00
Sergei Zimmerman
2b7e3e9b81 dev-shell: Drop bear dependency
Since the autotools-based build system has been removed
and meson already generates compile database there's no
need to have it in the devshell.

(cherry picked from commit 67535263a5)
2025-05-15 21:49:21 +00:00
John Ericson
dc1a5135ee
Merge pull request #13207 from xokdvium/drop-bear
dev-shell: Drop bear dependency
2025-05-15 17:48:08 -04:00
Sergei Zimmerman
67535263a5
dev-shell: Drop bear dependency
Since the autotools-based build system has been removed
and meson already generates compile database there's no
need to have it in the devshell.
2025-05-15 21:13:13 +00:00
John Ericson
7bd9eef772 Deduplicate the goal creation functions
The weak reference logic is the same in both these cases, and if/when I
get rid `addWantedOutputs`, also in the `DerivationGoal` case.
2025-05-15 16:59:48 -04:00
John Ericson
01207fd101 Remove useDerivation
Try to make `DerivationGoal` care less whether we're working from an
in-memory derivation or not.

It's a clean-up in its own right, but it will also help with other
cleanups under the umbrella of #12628.
2025-05-15 13:40:26 -04:00
John Ericson
c1085ce849 Get rid of virtual Goal::init()
Now, each class provides the initial coroutine by value. This avoids
some sketchy virtual function stuff, and will also be further put to
good use in the next commit.
2025-05-15 13:40:26 -04:00
Jörg Thalheim
fee8454dd0
Merge pull request #13205 from NixOS/mergify/bp/2.29-maintenance/pr-13202
Fix nix-copy-closure VM test (backport #13202)
2025-05-15 18:34:32 +02:00
Eelco Dolstra
dc238ba102 Fix nix-copy-closure VM test
https://hydra.nixos.org/build/297112538
(cherry picked from commit d626348f42)
2025-05-15 15:51:43 +00:00
Jörg Thalheim
0d3750e902
Merge pull request #13202 from NixOS/fix-nix-copy-closure-test
Fix nix-copy-closure VM test
2025-05-15 17:50:12 +02:00
mergify[bot]
fa7a5ab07a
Merge pull request #13201 from NixOS/mergify/bp/2.29-maintenance/pr-13197
Update Nixpkgs to fix static builds (backport #13197)
2025-05-15 11:48:30 +00:00
Eelco Dolstra
d626348f42 Fix nix-copy-closure VM test
https://hydra.nixos.org/build/297112538
2025-05-15 12:55:08 +02:00
Eelco Dolstra
27932ae6da
Merge pull request #13199 from NixOS/mergify/bp/2.29-maintenance/pr-13196
rename StoreDirConfigItself to StoreDirConfigBase (backport #13196)
2025-05-15 12:44:09 +02:00
Eelco Dolstra
631d23788e
Merge pull request #13198 from NixOS/mergify/bp/2.29-maintenance/pr-13195
Remove otherNixes.nix_2_18 (backport #13195)
2025-05-15 12:24:24 +02:00
Eelco Dolstra
4f03bfebd9 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f02fddb8acef29a8b32f10a335d44828d7825b78?narHash=sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds%2Bhc%3D' (2025-05-01)
  → 'github:NixOS/nixpkgs/adaa24fbf46737f3f1b5497bf64bae750f82942e?narHash=sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY%3D' (2025-05-13)

(cherry picked from commit 3ba49d7ec2)
2025-05-15 10:21:25 +00:00
Jörg Thalheim
ea09198f93
Merge pull request #13197 from NixOS/bump-nixpkgs
Update Nixpkgs to fix static builds
2025-05-15 12:20:06 +02:00
Jörg Thalheim
7f488dc7d3 rename StoreDirConfigItself to StoreDirConfigBase
context: https://github.com/NixOS/nix/pull/13154#discussion_r2081904653
(cherry picked from commit 2dd2142754)
2025-05-15 10:04:22 +00:00
Eelco Dolstra
0b46025f7a
Merge pull request #13196 from Mic92/store-config-base
rename StoreDirConfigItself to StoreDirConfigBase
2025-05-15 12:03:11 +02:00
Eelco Dolstra
1b2e88effd Remove otherNixes.nix_2_18
Nixpkgs no longer has Nix 2.18, so this fails to evaluate.

(cherry picked from commit bc85e20fb9)
2025-05-15 09:44:21 +00:00
Jörg Thalheim
2dacdd110c
Merge pull request #13195 from NixOS/remove-nix_2_18
Remove otherNixes.nix_2_18
2025-05-15 11:43:12 +02:00
Eelco Dolstra
3ba49d7ec2 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f02fddb8acef29a8b32f10a335d44828d7825b78?narHash=sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds%2Bhc%3D' (2025-05-01)
  → 'github:NixOS/nixpkgs/adaa24fbf46737f3f1b5497bf64bae750f82942e?narHash=sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY%3D' (2025-05-13)
2025-05-15 11:31:34 +02:00
Jörg Thalheim
2dd2142754 rename StoreDirConfigItself to StoreDirConfigBase
context: https://github.com/NixOS/nix/pull/13154#discussion_r2081904653
2025-05-15 11:24:42 +02:00
Eelco Dolstra
3285b68044
Merge pull request #13176 from obsidiansystems/revert-incomplete-closure-feature
Revert #77
2025-05-15 11:13:31 +02:00
Eelco Dolstra
bc85e20fb9 Remove otherNixes.nix_2_18
Nixpkgs no longer has Nix 2.18, so this fails to evaluate.
2025-05-15 11:10:21 +02:00
John Ericson
c3e7e88889
Merge pull request #13194 from NixOS/bump-2.30.0
Bump 2.30.0
2025-05-14 20:40:24 -04:00
John Ericson
99cb85cd37 Revert "If a substitute closure is incomplete, build dependencies, then retry the substituter"
As summarized in
https://github.com/NixOS/nix/issues/77#issuecomment-2843228280 the
motivation is that the complicated retry logic this introduced was
making the cleanup task #12628 harder to accomplish. It was not easy to
ascertain just what policy / semantics the extra control-flow was
implementing, in order to figure out a different way to implementing it
either.

After talking to Eelco about it, he decided we could just....get rid of
the feature entirely! It's a bit scary removing a decade+ old feature,
but I think he is right. See the release notes for more explanation.

This reverts commit 299141ecbd.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-14 20:16:40 -04:00
John Ericson
4dcf21a2f6 Merge branch 'master' into 2.29-maintenance 2025-05-14 19:59:35 -04:00
John Ericson
95e1f463c8 .mergify.yml: Add backport 2.29-maintenance entry 2025-05-14 19:59:22 -04:00
John Ericson
6591a4119c Bump version 2025-05-14 19:59:22 -04:00
John Ericson
45726dcc55
Merge pull request #13189 from NixOS/rl-next
Add release notes
2025-05-14 19:58:59 -04:00
John Ericson
f70796309d
Merge pull request #13193 from xokdvium/lru-cache
libutil: Less unnecessary copying in `LRUCache`
2025-05-14 19:29:53 -04:00
John Ericson
ff24751bdd Mark official release 2025-05-14 19:29:50 -04:00
John Ericson
1b22f0252d
Merge pull request #13192 from NixOS/store-open-reg-header
Factor out `resolveStoreConfig`
2025-05-14 19:20:05 -04:00
John Ericson
6e9350d53f Add little blurb at the top of 2.29 release notes 2025-05-14 19:05:27 -04:00
John Ericson
29e78faa59 Slightly sort 2.29 release notes 2025-05-14 18:46:35 -04:00
John Ericson
646f3064a3 Cache more contributors 2025-05-14 18:44:39 -04:00
John Ericson
d5e7359155 release notes: 2.29.0 2025-05-14 18:43:53 -04:00
John Ericson
d7481b4b63 Factor out resolveStoreConfig
Leverage #10766 to show how we can now resolve a store configuration
without actually opening the store for that resolved configuration.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2025-05-14 18:30:25 -04:00
Robert Hensing
12b7132209
Merge pull request #13188 from NixOS/store-open-reg-header
Split out `store-open.hh` and `store-registration.hh`
2025-05-15 00:21:32 +02:00
John Ericson
18894c934f Merge remote-tracking branch 'upstream/master' into rl-next 2025-05-14 18:14:55 -04:00