1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00
Commit graph

2883 commits

Author SHA1 Message Date
Shahar "Dawn" Or
3f56dd9927 stack overflow is EvalBaseError
(cherry picked from commit 23c7a45a05)
2025-03-21 14:13:40 +00:00
John Ericson
f636ced7d2 Revert "Revert "Revert "Adapt scheduler to work with dynamic derivations"""
The bug reappeared after all, and the fix introduced a different bug. We
want to release 2.27 imminently so there is no time to do a proper fix,
which appears to require a larger reworking. Hopefully we will have it
for 2.28, however.

This reverts commit c98525235f.
2025-02-27 13:42:57 -05:00
Eelco Dolstra
1293388039
Merge pull request #12544 from xokdvium/debugger-use-after-free
libexpr: Fix use-after-free of StaticEnv::up
2025-02-27 16:55:49 +01:00
Eelco Dolstra
14c9755462 nix flake archive: Recurse into relative path inputs
We can't ignore them entirely, since we do want to archive their
transitive inputs.

Fixes #12438.
2025-02-24 22:10:02 +01:00
Eelco Dolstra
b4dfeafed5 nix flake archive: Skip relative path inputs
Fixes #12438.
2025-02-24 15:30:30 +01:00
Sergei Zimmerman
0d5004508f tests/functional: Add flake-based regression for debugger use-after-free
This is the simplest reproducer I have. It would be great to find
a repro without flakes, but I guess this should be ok for now.
2025-02-21 14:36:39 +00:00
Eelco Dolstra
641733fd26 Add test 2025-02-19 12:47:28 +01:00
John Ericson
5facd492ad
Merge pull request #12499 from DeterminateSystems/detect-daemon-crash
startDaemon(): Detect if the daemon crashes before creating the socket
2025-02-18 11:38:16 -05:00
Robert Hensing
2b5365bcf7 tests: Fix installTests 2025-02-18 15:55:19 +01:00
Eelco Dolstra
11c42cb2e1 startDaemon(): Detect if the daemon crashes before creating the socket
This avoids timeouts like those seen in
3735812034.
2025-02-18 11:57:45 +01:00
Robert Hensing
3556f6bf4c Write just ./.version on all components
This way it's easier to get right. See previous commit.
2025-02-18 11:41:35 +01:00
Robert Hensing
c5fcb1bd50 Fix a few warnings 2025-02-17 19:29:01 +01:00
Eelco Dolstra
54388893bc dep-built-drv-2.sh: Don't fail with "cannot create symlink" 2025-02-17 11:57:21 +01:00
John Ericson
222a57c9ca More interesting dynamic derivations example
Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>
2025-02-16 18:00:34 -05:00
Robert Hensing
07f853b295
Merge pull request #9415 from NixOS/fix-dynamic-derivations
Revert "Revert "Adapt scheduler to work with dynamic derivations
2025-02-16 23:59:39 +01:00
Leandro Reina
b2d352e6a3 Add inputs.self.lfs 2025-02-13 17:59:27 +01:00
Robert Hensing
693a38ae2e
Merge pull request #10153 from b-camacho/lfs
git-lfs support
2025-02-13 14:25:30 +01:00
Robert Hensing
eb91014928
Merge pull request #12443 from DeterminateSystems/prefetch-out-link
nix flake prefetch: Add --out-link option
2025-02-12 22:22:04 +01:00
Eelco Dolstra
17d46041b8 Add test 2025-02-12 22:05:38 +01:00
Eelco Dolstra
26b87e78b5 copyPathToStore(): Preserve symlinks
E.g. in a derivation attribute `foo = ./bar`, if ./bar is a symlink,
we should copy the symlink to the store, not its target. This restores
the behaviour of Nix <= 2.19.
2025-02-11 20:58:48 +01:00
Eelco Dolstra
b813a764e0 Merge remote-tracking branch 'origin/master' into self-input-attrs 2025-02-10 17:01:19 +01:00
Eelco Dolstra
1cb9a354fb Merge remote-tracking branch 'origin/master' into lfs 2025-02-10 14:46:01 +01:00
John Ericson
cafefed421 Rename to "content-address*ing* derivation"
"content-address*ed*" derivation is misleading because all derivations
are *themselves* content-addressed. What may or may not be
content-addressed is not derivation itself, but the *output* of the
derivation.

The outputs are not *part* of the derivation (for then the derivation
wouldn't be complete before we built it) but rather separate entities
produced by the derivation.

"content-adddress*ed*" is not correctly because it can only describe
what the derivation *is*, and that is not what we are trying to do.

"content-address*ing*" is correct because it describes what the
derivation *does* --- it produces content-addressed data.
2025-02-10 01:12:56 -05:00
Robert Hensing
414c346560 test: Use skipTest instead of exit 0
This way shellcheck is ok with it, and it conveys that a significant
chunk of the test is skipped.
2025-02-07 11:20:18 +01:00
Robert Hensing
77a8386022 test: Fix shellcheck by giving git-hashing scripts shebangs
This seems to be the way to do it now, even though I can't run them
without setting at least one env var.
I'll only fix shellcheck for now. Don't shoot the messenger.

It isn't quite clear to me why the previous commit masked this problem,
but I'm glad shellcheck has an effect or more effect now.
2025-02-07 10:56:15 +01:00
John Ericson
c98525235f Revert "Revert "Adapt scheduler to work with dynamic derivations""
This fixes dynamic derivations, reverting #9081.

I believe that this time around, #9052 is fixed. When I first rebased
this, tests were failing (which wasn't the case before). The cause of
those test failures were due to the crude job in which the outer goal
tried to exit with the inner goal's status.

Now, that error handling has been reworked to be more faithful. The exit
exit status and exception of the inner goal is returned by the outer
goal. The exception was what was causing the test failures, but I
believe it was not having the right error code (there is more than one
for failure) that caused #9081.

The only cost of doing things the "right way" was that I had to
introduce a hacky `preserveException` boolean. I don't like this, but,
then again, none of us like anything about how the scheduler works.
Issue #11927 is still there to clean everything up, subsuming the need
for any `preserveException` because I doubt we will be fishing
information out of state machines like this at all.

This reverts commit 8440afbed7.

Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
2025-02-05 17:26:32 -05:00
Eelco Dolstra
38f391444b Add a test for a flake referencing a flake that has inputs.self 2025-02-04 22:14:38 +01:00
Eelco Dolstra
25fcc8d1ab Add inputs.self.submodules flake attribute
This allows a flake to specify that it needs Git submodules to be
enabled (or disabled, if we ever change the default) on the top-level
flake. This requires the input to be refetched, but since the first
fetch is lazy, this shouldn't be expensive.

Currently the only attribute allowed by `inputs.self` is `submodules`,
but more can be added in the future (e.g. a `lazy` attribute to opt in
to lazy tree behaviour).

Fixes #5312, #9842.
2025-02-04 21:16:33 +01:00
John Ericson
f90ba3a7c1
Update tests/functional/flakes/symlink-paths.sh 2025-02-04 11:25:14 -05:00
Eelco Dolstra
3c109095de Use 'nix flake prefetch' to get the store path of a flake
Future-proofing for when 'nix flake metadata' won't return a store
path anymore.
2025-02-04 15:24:50 +01:00
silvanshade
137ba71f02
Fix shellcheck lints 2025-02-03 17:47:37 -07:00
Leandro Reina
134530a534 Merge remote-tracking branch 'upstream/master' into lfs 2025-02-03 19:07:20 +01:00
mergify[bot]
24d11d22c3
Merge pull request #12286 from stevalkr/flakes_symlink_path
Fix flakes follow symlinks
2025-02-02 03:11:20 +00:00
mergify[bot]
340eae1f23
Merge pull request #12385 from DeterminateSystems/fix-git-workdir-path-display
Fix duplicate setPathDisplay()
2025-02-02 02:10:38 +00:00
Steve Walker
453e8dc067 Fix flakes follow symlinks
Co-authored-by: Jan Christoph Bischko <jbischko@barracuda.com>
2025-02-02 08:30:04 +07:00
Eelco Dolstra
8006196c55 tests/functional/fetchGit.sh: Add a test for NAR hash mismatches 2025-01-31 17:03:27 +01:00
Eelco Dolstra
4113fdf2f0 Allow use of lock files with unlocked entries as long as they have a NAR hash
Fixes #12364.
2025-01-31 17:03:27 +01:00
Eelco Dolstra
5dec1dc086 fetchGit/fetchTree: Allow fetching using only a NAR hash
Fixes #12027.
2025-01-31 17:03:27 +01:00
Eelco Dolstra
a142803c28 tests/functional/fetchGit.sh: Drop unnecessary --impure flags 2025-01-31 17:03:27 +01:00
Eelco Dolstra
5f6658b9c9 fetchTree: Distinguish between fetchGit and fetchTree consistently 2025-01-31 15:10:29 +01:00
Eelco Dolstra
177a067d66
Merge pull request #12372 from roberth/test-characterisation-log-to-stderr
tests/functional/characterisation/framework: Log to stderr
2025-01-30 11:34:39 +01:00
Eelco Dolstra
102d90ebf0 Fix duplicate setPathDisplay()
Fixes messages like 'copying /tmp/repo/tmp/repo to the store'. The
PosixSourceAccessor already sets the prefix. Setting the prefix twice
shouldn't be a problem, but GitRepoImpl::getAccessor() returns a
wrapped accessor so it's not actually idempotent.
2025-01-30 11:27:24 +01:00
Eelco Dolstra
fa87ad6a7c Fix shellcheck warnings 2025-01-29 15:34:49 +01:00
Robert Hensing
a5de2dd274 tests/functional/characterisation/framework: Log to stderr
It seems that `meson test --print-errorlogs` only captures stderr,
so this makes it forward the logs as intended.

We might want to redirect stdout in our common setup script instead.
2025-01-28 09:26:33 +01:00
Leandro Reina
6a3b4afc0a Merge remote-tracking branch 'upstream/master' into lfs 2025-01-27 14:44:41 +01:00
Robert Hensing
b04077c0ec fix: Update shifted source positions after formatting
Carefully reviewed...
2025-01-24 18:53:42 +01:00
Robert Hensing
96e550efc5 Format .nix files
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00
Eelco Dolstra
d48d464c8b Add a test for #12339 2025-01-24 15:25:10 +01:00
Eelco Dolstra
00d9e7e1f4 EvalState::resolveLookupPathPath(): Call resolveSymlinks() before pathExists()
Fixes #12339.
2025-01-24 12:15:07 +01:00
Eelco Dolstra
261b213272
Merge pull request #11900 from DeterminateSystems/fix-help-test
Fix help test in dev shell
2025-01-23 15:20:34 +01:00