about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-25T12·53+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-25T13·58+0200
commit0e9ddcc306f0900fc38472a2c8b9d9aa886b279e (patch)
tree564883e41ee9aee98ec1bdceed43f7d2be8f905b /src/libstore
parent1f56235438984d8079159d7c81ad4127c318b2dc (diff)
Restore activity metadata
This allows the progress bar to display "building perl-5.22.3" instead
of "building /nix/store/<hash>-perl-5.22.3.drv".
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index e97fcc9e269c..77dee2914677 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1390,7 +1390,8 @@ void DerivationGoal::tryToBuild()
     bool buildLocally = buildMode != bmNormal || drv->willBuildLocally();
 
     auto started = [&]() {
-        act = std::make_unique<Activity>(*logger, actBuild, fmt("building '%s'", drvPath));
+        act = std::make_unique<Activity>(*logger, actBuild,
+            fmt("building '%s'", drvPath), Logger::Fields{drvPath});
         mcRunningBuilds = std::make_unique<MaintainCount<uint64_t>>(worker.runningBuilds);
         worker.updateProgress();
     };
@@ -2405,13 +2406,15 @@ struct BuilderLogger : Logger
         prevLogger.log(lvl, fs);
     }
 
-    void startActivity(ActivityId act, ActivityType type, const std::string & s) override
+    void startActivity(ActivityId act, ActivityType type,
+        const std::string & s, const Fields & fields) override
     {
         nlohmann::json json;
         json["action"] = "start";
         json["id"] = act;
         json["type"] = type;
         json["text"] = s;
+        // FIXME: handle fields
         log(lvlError, "@nix " + json.dump());
     }