Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt scheduler to work with dynamic derivations #8829

Merged
merged 4 commits into from
Aug 25, 2023

Commits on Aug 25, 2023

  1. Introduce OutputName and OutputNameView type aliases

    Hopefully they make the code easier to understand!
    Ericson2314 committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    2f5d3da View commit details
    Browse the repository at this point in the history
  2. Throw MissingRealisation not plain Error in both `resolveDerivedP…

    …ath`
    
    Now we are consistent with the other `resolveDerivedPath`, and other
    such functions.
    Ericson2314 committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    1c4caef View commit details
    Browse the repository at this point in the history
  3. Use Worker::makeDerivationGoal less

    We're about to split up `DerivationGoal` a bit. At that point
    `makeDerivationGoal` will mean something more specific than it does
    today. (Perhaps a future rename will make this clearer.)
    
    On the other hand, the more public `Worker::makeGoal` function will
    continue to work exactly as before. So by moving some call sites to use
    that instead, we preemptively avoid issues in the next step.
    Ericson2314 committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    692074f View commit details
    Browse the repository at this point in the history
  4. Adapt scheduler to work with dynamic derivations

    To avoid dealing with an optional `drvPath` (because we might not know
    it yet) everywhere, make an `CreateDerivationAndRealiseGoal`. This goal
    just builds/substitutes the derivation file, and then kicks of a build
    for that obtained derivation; in other words it does the chaining of
    goals when the drv file is missing (as can already be the case) or
    computed (new case).
    
    This also means the `getDerivation` state can be removed from
    `DerivationGoal`, which makes the `BasicDerivation` / in memory case and
    `Derivation` / drv file file case closer together.
    
    The map type is factored out for clarity, and because we will soon hvae
    a second use for it (`Derivation` itself).
    
    Co-authored-by: Robert Hensing <[email protected]>
    Ericson2314 and roberth committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    5e3986f View commit details
    Browse the repository at this point in the history