Skip to content

Restore dynamic derivations!#13186

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:dyn-drv-without-new-goal-type
May 21, 2025
Merged

Restore dynamic derivations!#13186
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:dyn-drv-without-new-goal-type

Conversation

@Ericson2314
Copy link
Member

Motivation

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.

Context

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 f4f28cd.

depends on #13181


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner May 14, 2025 18:47
@github-actions github-actions bot added documentation with-tests Issues related to testing. PRs with tests have some priority labels May 14, 2025
@Ericson2314 Ericson2314 force-pushed the dyn-drv-without-new-goal-type branch 4 times, most recently from e5b97db to 37b92ea Compare May 20, 2025 15:57
@github-project-automation github-project-automation bot moved this to To triage in Nix team May 20, 2025
@dpulls
Copy link

dpulls bot commented May 21, 2025

🎉 All dependencies have been resolved !

@Ericson2314 Ericson2314 force-pushed the dyn-drv-without-new-goal-type branch 2 times, most recently from a2a8ab8 to 82a6649 Compare May 21, 2025 21:16
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some dogfooding before merge, but other than that, this looks good to me!

@Ericson2314 Ericson2314 enabled auto-merge May 21, 2025 21:26
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
f4f28cd.
@Ericson2314 Ericson2314 force-pushed the dyn-drv-without-new-goal-type branch from 82a6649 to 57348b6 Compare May 21, 2025 21:31
@Ericson2314 Ericson2314 merged commit 76a4d4c into NixOS:master May 21, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from To triage to Done in Nix team May 21, 2025
@Ericson2314 Ericson2314 deleted the dyn-drv-without-new-goal-type branch May 21, 2025 22:41
@purepani
Copy link

Third time's the charm

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2025-05-21-nix-team-meeting-minutes-228/65204/1

@roberth roberth added the backports rejected PR should not be backported (or at least not in full, or unless an overriding need arises) label Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backports rejected PR should not be backported (or at least not in full, or unless an overriding need arises) documentation with-tests Issues related to testing. PRs with tests have some priority

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants