diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-03-03 01:11:09 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-15 11:01:31 -0400 |
commit | 9df7f3f5379ba79e6b40fb73bb91604cc7116c85 (patch) | |
tree | 9c72c41566bc44aa1bc8073bc4594a40702e4a3c /src/libstore/build/worker.hh | |
parent | ab228d73db31ba854faca3d6264817551bcfd4c5 (diff) |
Introduce `Worker::makeGoal`
This takes a `DerivedPath` so the caller doesn't need to care about
which sort of goal does what.
Diffstat (limited to 'src/libstore/build/worker.hh')
-rw-r--r-- | src/libstore/build/worker.hh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index 48a1a27fa..bb51d641d 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -181,7 +181,7 @@ public: */ /** - * derivation goal + * @ref DerivationGoal "derivation goal" */ private: std::shared_ptr<DerivationGoal> makeDerivationGoalCommon( @@ -196,12 +196,20 @@ public: const OutputsSpec & wantedOutputs, BuildMode buildMode = bmNormal); /** - * substitution goal + * @ref SubstitutionGoal "substitution goal" */ std::shared_ptr<PathSubstitutionGoal> makePathSubstitutionGoal(const StorePath & storePath, RepairFlag repair = NoRepair, std::optional<ContentAddress> ca = std::nullopt); std::shared_ptr<DrvOutputSubstitutionGoal> makeDrvOutputSubstitutionGoal(const DrvOutput & id, RepairFlag repair = NoRepair, std::optional<ContentAddress> ca = std::nullopt); /** + * Make a goal corresponding to the `DerivedPath`. + * + * It will be a `DerivationGoal` for a `DerivedPath::Built` or + * a `SubstitutionGoal` for a `DerivedPath::Opaque`. + */ + GoalPtr makeGoal(const DerivedPath & req, BuildMode buildMode = bmNormal); + + /** * Remove a dead goal. */ void removeGoal(GoalPtr goal); |