From 0e9ddcc306f0900fc38472a2c8b9d9aa886b279e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Aug 2017 14:53:50 +0200 Subject: Restore activity metadata This allows the progress bar to display "building perl-5.22.3" instead of "building /nix/store/-perl-5.22.3.drv". --- src/libstore/build.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libstore') 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(*logger, actBuild, fmt("building '%s'", drvPath)); + act = std::make_unique(*logger, actBuild, + fmt("building '%s'", drvPath), Logger::Fields{drvPath}); mcRunningBuilds = std::make_unique>(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()); } -- cgit 1.4.1