1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
Commit graph

18 commits

Author SHA1 Message Date
John Ericson
57348b677b Restore dynamic derivations!
This method does *not* create a new type of goal. We instead just make
`DerivationGoal` more sophisticated, which is much easier to do now that
`DerivationBuildingGoal` has been split from it (and so many fields are
gone, or or local variables instead).

This avoids the need for a secondarily trampoline goal that interacted
poorly with `addWantedOutputs`. That, I hope, will mean the bugs from
before do not reappear.

There may in fact be a reason to introduce such a trampoline in the
future, but it would only happen in conjunction with getting rid of
`addWantedOutputs`.

Restores the functionality (and tests) that was reverted in
f4f28cdd0e.
2025-05-21 17:31:41 -04:00
John Ericson
f4f28cdd0e Revert "Revert "Revert "Adapt scheduler to work with dynamic derivations"""
The bug reappeared after all, and the fix introduced a different bug. I
just reverted on 2.27 first, in #12576, but upon further introspection
and discussion with @roberth, with preparing for and travelling to
Planet Nix I will not be able to fix it on `master` soon enough for a
revert to not be warranted here in the meantime also.

This reverts commit c98525235f.
2025-03-02 15:34:21 -05: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
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
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
Robert Hensing
96e550efc5 Format .nix files
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00
Eelco Dolstra
f29e7867a9 Revert "Merge pull request #11826 from DeterminateSystems/revert-11804"
This reverts commit aeffdeffc8, reversing
changes made to 723fdeb4f1.
2024-11-11 15:21:34 +01:00
Eelco Dolstra
67d231c046 Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
This reverts commit 619eeb658a, reversing
changes made to 1af94bf471.
2024-11-07 13:46:37 +01:00
John Ericson
f7591bc6ed Make config.nix shims
As requested in https://github.com/NixOS/nix/pull/11792#discussion_r1827034428
2024-11-06 16:09:18 -05:00
John Ericson
e70c9bb06a Remove old build system 2024-11-06 16:09:18 -05:00
John Ericson
9d2ed0a7d3 No longer copy functional tests to the build dir
This should make `_NIX_TEST_ACCEPT=1` work again, fixing #11369.

Progress on #2503
2024-11-03 16:42:38 -05:00
John Ericson
34fe2478a2 Build Functional tests with Meson
Co-Authored-By: Qyriad <qyriad@qyriad.me>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-14 15:35:40 -04:00
Robert Hensing
8557d79650 tests/functional: Skip tests that don't work in NixOS environment yet 2024-06-20 14:54:11 +02:00
Cameron Dart
1c1abefdd2 housekeeping: shellcheck for tests/functional/dyn-drv/text-hashed-output.sh 2024-06-12 17:41:16 -04:00
Rebecca Turner
cb7fbd4d83
Print value on type error
Adds the failing value to `value is <TYPE> while a <TYPE> is expected`
error messages.
2024-01-22 08:56:02 -08:00
John Ericson
68c81c7375 Put functional tests in tests/functional
I think it is bad for these reasons when `tests/` contains a mix of
functional and integration tests

 - Concepts is harder to understand, the documentation makes a good
   unit vs functional vs integration distinction, but when the
   integration tests are just two subdirs within `tests/` this is not
   clear.

 - Source filtering in the `flake.nix` is more complex. We need to
   filter out some of the dirs from `tests/`, rather than simply pick
   the dirs we want and take all of them. This is a good sign the
   structure of what we are trying to do is not matching the structure
   of the files.

With this change we have a clean:
```shell-session
$ git show 'HEAD:tests'
tree HEAD:tests

functional/
installer/
nixos/
```
2023-10-06 09:05:56 -04:00