1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

Remove some buildMode default parameters

Force the internals to be more explicit.
This commit is contained in:
John Ericson 2025-10-13 18:40:10 -04:00
parent 2ee41976c2
commit 06bb1c2f93
4 changed files with 8 additions and 16 deletions

View file

@ -29,8 +29,7 @@ typedef enum { rpAccept, rpDecline, rpPostpone } HookReply;
*/ */
struct DerivationBuildingGoal : public Goal struct DerivationBuildingGoal : public Goal
{ {
DerivationBuildingGoal( DerivationBuildingGoal(const StorePath & drvPath, const Derivation & drv, Worker & worker, BuildMode buildMode);
const StorePath & drvPath, const Derivation & drv, Worker & worker, BuildMode buildMode = bmNormal);
~DerivationBuildingGoal(); ~DerivationBuildingGoal();
private: private:

View file

@ -45,7 +45,7 @@ struct DerivationGoal : public Goal
const Derivation & drv, const Derivation & drv,
const OutputName & wantedOutput, const OutputName & wantedOutput,
Worker & worker, Worker & worker,
BuildMode buildMode = bmNormal); BuildMode buildMode);
~DerivationGoal() = default; ~DerivationGoal() = default;
void timedOut(Error && ex) override void timedOut(Error && ex) override

View file

@ -35,8 +35,7 @@ struct BuilderFailureError;
*/ */
struct DerivationResolutionGoal : public Goal struct DerivationResolutionGoal : public Goal
{ {
DerivationResolutionGoal( DerivationResolutionGoal(const StorePath & drvPath, const Derivation & drv, Worker & worker, BuildMode buildMode);
const StorePath & drvPath, const Derivation & drv, Worker & worker, BuildMode buildMode = bmNormal);
/** /**
* If the derivation needed to be resolved, this is resulting * If the derivation needed to be resolved, this is resulting

View file

@ -210,32 +210,26 @@ private:
std::shared_ptr<G> initGoalIfNeeded(std::weak_ptr<G> & goal_weak, Args &&... args); std::shared_ptr<G> initGoalIfNeeded(std::weak_ptr<G> & goal_weak, Args &&... args);
std::shared_ptr<DerivationTrampolineGoal> makeDerivationTrampolineGoal( std::shared_ptr<DerivationTrampolineGoal> makeDerivationTrampolineGoal(
ref<const SingleDerivedPath> drvReq, const OutputsSpec & wantedOutputs, BuildMode buildMode = bmNormal); ref<const SingleDerivedPath> drvReq, const OutputsSpec & wantedOutputs, BuildMode buildMode);
public: public:
std::shared_ptr<DerivationTrampolineGoal> makeDerivationTrampolineGoal( std::shared_ptr<DerivationTrampolineGoal> makeDerivationTrampolineGoal(
const StorePath & drvPath, const StorePath & drvPath, const OutputsSpec & wantedOutputs, const Derivation & drv, BuildMode buildMode);
const OutputsSpec & wantedOutputs,
const Derivation & drv,
BuildMode buildMode = bmNormal);
std::shared_ptr<DerivationGoal> makeDerivationGoal( std::shared_ptr<DerivationGoal> makeDerivationGoal(
const StorePath & drvPath, const StorePath & drvPath, const Derivation & drv, const OutputName & wantedOutput, BuildMode buildMode);
const Derivation & drv,
const OutputName & wantedOutput,
BuildMode buildMode = bmNormal);
/** /**
* @ref DerivationResolutionGoal "derivation resolution goal" * @ref DerivationResolutionGoal "derivation resolution goal"
*/ */
std::shared_ptr<DerivationResolutionGoal> std::shared_ptr<DerivationResolutionGoal>
makeDerivationResolutionGoal(const StorePath & drvPath, const Derivation & drv, BuildMode buildMode = bmNormal); makeDerivationResolutionGoal(const StorePath & drvPath, const Derivation & drv, BuildMode buildMode);
/** /**
* @ref DerivationBuildingGoal "derivation building goal" * @ref DerivationBuildingGoal "derivation building goal"
*/ */
std::shared_ptr<DerivationBuildingGoal> std::shared_ptr<DerivationBuildingGoal>
makeDerivationBuildingGoal(const StorePath & drvPath, const Derivation & drv, BuildMode buildMode = bmNormal); makeDerivationBuildingGoal(const StorePath & drvPath, const Derivation & drv, BuildMode buildMode);
/** /**
* @ref PathSubstitutionGoal "substitution goal" * @ref PathSubstitutionGoal "substitution goal"