aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build/derivation-goal.cc10
-rw-r--r--src/libstore/build/derivation-goal.hh2
-rw-r--r--src/libstore/build/drv-output-substitution-goal.cc7
-rw-r--r--src/libstore/build/drv-output-substitution-goal.hh2
-rw-r--r--src/libstore/build/goal.cc7
-rw-r--r--src/libstore/build/goal.hh8
-rw-r--r--src/libstore/build/substitution-goal.hh9
7 files changed, 1 insertions, 44 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 037b4fb10..f28285ad8 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -113,16 +113,6 @@ DerivationGoal::~DerivationGoal() noexcept(false)
}
-std::string DerivationGoal::key()
-{
- /* Ensure that derivations get built in order of their name,
- i.e. a derivation named "aardvark" always comes before
- "baboon". And substitution goals always happen before
- derivation goals (due to "b$"). */
- return "b$" + std::string(drvPath.name()) + "$" + worker.store.printStorePath(drvPath);
-}
-
-
void DerivationGoal::killChild()
{
hook.reset();
diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/build/derivation-goal.hh
index b1311bd7e..6e8e979d3 100644
--- a/src/libstore/build/derivation-goal.hh
+++ b/src/libstore/build/derivation-goal.hh
@@ -247,8 +247,6 @@ struct DerivationGoal : public Goal
Finished timedOut(Error && ex);
- std::string key() override;
-
kj::Promise<Result<WorkResult>> work() noexcept override;
/**
diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc
index 923cbba58..846268a3a 100644
--- a/src/libstore/build/drv-output-substitution-goal.cc
+++ b/src/libstore/build/drv-output-substitution-goal.cc
@@ -166,13 +166,6 @@ try {
return {std::current_exception()};
}
-std::string DrvOutputSubstitutionGoal::key()
-{
- /* "a$" ensures substitution goals happen before derivation
- goals. */
- return "a$" + std::string(id.to_string());
-}
-
kj::Promise<Result<Goal::WorkResult>> DrvOutputSubstitutionGoal::work() noexcept
{
return (this->*state)(slotToken.valid());
diff --git a/src/libstore/build/drv-output-substitution-goal.hh b/src/libstore/build/drv-output-substitution-goal.hh
index 805b65bfa..543fa7ed4 100644
--- a/src/libstore/build/drv-output-substitution-goal.hh
+++ b/src/libstore/build/drv-output-substitution-goal.hh
@@ -74,8 +74,6 @@ public:
kj::Promise<Result<WorkResult>> outPathValid(bool inBuildSlot) noexcept;
kj::Promise<Result<WorkResult>> finished() noexcept;
- std::string key() override;
-
kj::Promise<Result<WorkResult>> work() noexcept override;
JobCategory jobCategory() const override {
diff --git a/src/libstore/build/goal.cc b/src/libstore/build/goal.cc
index 5f0ed485c..957bc2aaf 100644
--- a/src/libstore/build/goal.cc
+++ b/src/libstore/build/goal.cc
@@ -6,13 +6,6 @@
namespace nix {
-bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) const {
- std::string s1 = a->key();
- std::string s2 = b->key();
- return s1 < s2;
-}
-
-
void Goal::trace(std::string_view s)
{
debug("%1%: %2%", name, s);
diff --git a/src/libstore/build/goal.hh b/src/libstore/build/goal.hh
index f808be160..4436e44b1 100644
--- a/src/libstore/build/goal.hh
+++ b/src/libstore/build/goal.hh
@@ -22,14 +22,10 @@ class Worker;
*/
typedef std::shared_ptr<Goal> GoalPtr;
-struct CompareGoalPtrs {
- bool operator() (const GoalPtr & a, const GoalPtr & b) const;
-};
-
/**
* Set of goals.
*/
-typedef std::set<GoalPtr, CompareGoalPtrs> Goals;
+typedef std::set<GoalPtr> Goals;
/**
* Used as a hint to the worker on how to schedule a particular goal. For example,
@@ -167,8 +163,6 @@ public:
return name;
}
- virtual std::string key() = 0;
-
virtual void cleanup() { }
/**
diff --git a/src/libstore/build/substitution-goal.hh b/src/libstore/build/substitution-goal.hh
index cef3a4c5c..5411afa01 100644
--- a/src/libstore/build/substitution-goal.hh
+++ b/src/libstore/build/substitution-goal.hh
@@ -90,15 +90,6 @@ public:
);
~PathSubstitutionGoal();
- /**
- * We prepend "a$" to the key name to ensure substitution goals
- * happen before derivation goals.
- */
- std::string key() override
- {
- return "a$" + std::string(storePath.name()) + "$" + worker.store.printStorePath(storePath);
- }
-
kj::Promise<Result<WorkResult>> work() noexcept override;
/**