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

3086 commits

Author SHA1 Message Date
Eelco Dolstra
e809a5626e
Merge pull request #130 from DeterminateSystems/improve-nix-store-delete-errors
nix store delete: Show why deletion fails
2025-06-30 15:04:19 +00:00
Eelco Dolstra
71aecfc481 Fix test 2025-06-30 11:30:24 +02:00
Eelco Dolstra
38a73203a4 Fix eval caching for path flakes
This fix is somewhat hacky since the accessor/input fingerprint
situation is a bit of a mess.
2025-06-27 20:02:18 +02:00
Eelco Dolstra
31b00218fe Show which PID is causing a temp root
Example:

  error: Cannot delete path '/nix/store/klyng5rpdkwi5kbxkncy4gjwb490dlhb-foo.drv' because it's in use by Nix process '{nix-process:3605324}'.
2025-06-27 16:50:48 +02:00
Eelco Dolstra
0e352a6cec Merge remote-tracking branch 'detsys/detsys-main' into fix-deep-overrides 2025-06-25 21:53:23 +02:00
Eelco Dolstra
7059d2b58b Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29.1 2025-06-23 15:02:22 +02:00
Eelco Dolstra
833406121c Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.

(cherry picked from commit 9eb46e9cc0)
2025-06-22 19:09:38 +00:00
Eelco Dolstra
1d5e161755
Merge pull request #113 from DeterminateSystems/eelcodolstra/fh-851-lock-nar-hashes-by-default
Add lazy-locks setting
2025-06-19 17:01:14 +00:00
Vladimír Čunát
5d2986d3c5 tests: fixup with jq-1.8.0 2025-06-19 18:48:59 +02:00
Vladimír Čunát
86fbaf3b14 tests: fixup with jq-1.8.0
(cherry picked from commit 77f6b6532f)
2025-06-18 15:18:06 +00:00
Eelco Dolstra
3a4e6cadeb Improve regression testing for uncachable source paths
These now throw an error by default in the test suite.
2025-06-16 23:59:33 +02:00
Eelco Dolstra
e3fa4faff9 fetchToStore(): Don't require a valid path in dry run mode 2025-06-16 12:27:44 -04:00
Eelco Dolstra
dc5e620032 fetchToStore() cache: Use content hashes instead of store paths
We can always compute the store path from the content hash, but not
vice versa. Storing the content hash allows `hashPath()` to be
replaced by `fetchToStore(...FetchMode::DryRun...)`, which gets us
caching in lazy-trees mode.
2025-06-16 12:27:44 -04:00
Eelco Dolstra
cbedb8e19a Fix broken fetchToStore() caching on unlocked inputs 2025-06-13 22:29:20 +02:00
Eelco Dolstra
802f585406 Add lazy-locks setting
This determines whether lock file entries omit a NAR hash. They're
included by default to make lazy trees compatible with older clients.
2025-06-13 17:45:37 +02:00
Eelco Dolstra
6999183956 Don't allow flake inputs to have both a flakeref and a follows
Having both doesn't make sense so it's best to disallow it. If this
causes issues we could turn into a warning.
2025-06-12 20:38:51 +02:00
Eelco Dolstra
9a18a11d7d Add tests for deep overrides
Taken from https://github.com/NixOS/nix/pull/6621.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2025-06-12 20:33:28 +02:00
Eelco Dolstra
279a6b18db Formatting 2025-06-12 16:13:28 +02:00
Eelco Dolstra
0922c72777 Fix flakes test with lazy trees enabled 2025-06-12 16:02:42 +02:00
Eelco Dolstra
92d90e2aeb Run the Nix test suite with lazy trees enabled 2025-06-12 16:02:42 +02:00
Eelco Dolstra
a95067d428
Merge pull request #103 from DeterminateSystems/repl-test-robust
Make the repl test more robust
2025-06-11 17:37:40 +00:00
Luc Perkins
27755169f9
Merge pull request #92 from DeterminateSystems/lucperkins/fh-864-fix-error-messages-to-avoid-fake-future-tense
Fix some instances of 'will'
2025-06-11 17:27:24 +00:00
Eelco Dolstra
87fb81a624 Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.
2025-06-11 19:14:31 +02:00
Eelco Dolstra
de793b7324 Make the S3 test more robust
Waiting for the minio unit is apparently not reliable enough, so let's
also wait for the port.
2025-06-11 10:48:57 -04:00
Graham Christensen
62029df300 Fixup checks around the error message 'Will not write lock file of flake' 2025-06-06 17:29:11 -04:00
Graham Christensen
cbb635159c Fixup checks around the error message 'will not fetch unlocked input' 2025-06-06 17:28:17 -04:00
Cole Helbling
dfa7b2a288
libstore/unix/derivation-builder: error earlier when sandbox path is inaccessible 2025-06-04 12:16:34 -07:00
Sergei Zimmerman
a2567f6d7a Clear displayPrefix in makeEmptySourceAccessor
Judging by the comment for `makeEmptySourceAccessor` the prefix has
to be empty:

> Return a source accessor that contains only an empty root directory.

Fixes #13295.

(cherry picked from commit fba1bb0c13)
2025-06-03 19:27:15 +02:00
Cole Helbling
242719cffb
--keep-failed with remote builders will keep the failed build directory on that builder 2025-06-02 14:41:29 -07:00
Graham Christensen
1500e541f2 diff-closures: use removed / added words 2025-06-02 11:21:26 -04:00
Graham Christensen
724d552b64 Use words like added / removed 2025-06-02 09:30:18 -04:00
Graham Christensen
7d2dbbd3aa Rename ε to "(no version)" 2025-06-02 09:22:55 -04:00
Eelco Dolstra
5f13d13f78 Fix trace-ifd test failure in dev shell
Fixes

  error: cannot create symlink '/home/eelco/Dev/nix/tests/functional/flakes/result'; already exists

running the test multiple times in a dev shell.
2025-05-26 13:56:38 +02:00
Eelco Dolstra
d068b82c2f Add test
(cherry picked from commit c66eb9cef7)
2025-05-25 05:55:28 +00:00
Eelco Dolstra
4bc1043ae4 Add test 2025-05-24 00:46:37 +02:00
gustavderdrache
4355b7cbd5 Add test for output warning to ensure stability 2025-05-22 17:30:14 -04:00
Eelco Dolstra
f50117ba4c Revert storeFS to use makeFSSourceAccessor()
Need to investigate why store->getFSAccessor() breaks a test.
2025-05-18 10:01:57 +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
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
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
John Ericson
d972f9e2e2 Split out store-open.hh and store-registration.hh
The existing header is a bit too big. Now the following use-cases are
separated, and get their own headers:

- Using or implementing an arbitrary store: remaining `store-api.hh`

  This is closer to just being about the `Store` (and `StoreConfig`)
  classes, as one would expect.

- Opening a store from a textual description: `store-open.hh`

  Opening an aribtrary store implementation like this requires some sort
  of store registration mechanism to exists, but the caller doesn't need
  to know how it works. This just exposes the functions which use such a
  mechanism, without exposing the mechanism itself

- Registering a store implementation: `store-registration.hh`

  This requires understanding how the mechanism actually works, and the
  mechanism in question involves templated machinery in headers we
  rather not expose to things that don't need it, as it would slow down
  compilation for no reason.
2025-05-14 16:07:57 -04:00
Eelco Dolstra
824e0d51fe Test lock file contents more precisely 2025-05-13 10:40:24 +02:00
Jörg Thalheim
ed521760bc
Merge pull request #13161 from NixOS/remove-final
nix flake prefetch: Remove __final
2025-05-13 08:50:36 +02:00
Jörg Thalheim
6fdb170fb3
Merge pull request #13159 from NixOS/ignore-dir
Avoid unnecessarily updating old lock files with 'dir' parameters
2025-05-12 22:34:50 +02:00
Eelco Dolstra
51349ca37a Test lock file contents more precisely 2025-05-12 18:00:40 +02:00
Eelco Dolstra
4ea5cb3832 Fix emitting narHash in lock files when lazy trees are disabled 2025-05-12 17:34:32 +02:00
Eelco Dolstra
5a84237209 Improve build failure error messages
They're now laid out in a more readable way, and they shows the output
paths (if known).
2025-05-12 15:06:54 +02:00
Eelco Dolstra
da953d6d39 Add test 2025-05-09 16:55:13 +02:00
Graham Christensen
290368169e
Merge pull request #58 from DeterminateSystems/improve-build-failure-error
Improve build failure error messages
2025-05-09 14:03:35 +00:00