Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a1333c3a7428
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b839dc1c8268
Choose a head ref

Commits on Nov 18, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0fa6d38 View commit details
  2. Merge pull request #4268 from DavHau/patch-1

    fix typo in comment in fetchurl.nix
    edolstra authored Nov 18, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    79aa7d9 View commit details

Commits on Nov 19, 2020

  1. Make drv hash modulo memo table thread-safe

    Let's get one step closer to the daemon not needing to fork.
    Ericson2314 committed Nov 19, 2020
    Copy the full SHA
    2113ae2 View commit details
  2. Merge pull request #4269 from obsidiansystems/sync-hash-derivation-mo…

    …dulo-cache
    
    Make drv hash modulo memo table thread-safe
    edolstra authored Nov 19, 2020
    Copy the full SHA
    bc4df33 View commit details
  3. Copy the full SHA
    0327580 View commit details
  4. AttrCursor::getStringWithContext(): Force re-evaluation if the cached…

    … context is not valid
    
    Fixes #4236.
    edolstra committed Nov 19, 2020
    Copy the full SHA
    4dcb183 View commit details

Commits on Nov 20, 2020

  1. Macro hygiene

    edolstra committed Nov 20, 2020
    Copy the full SHA
    ef62623 View commit details
  2. Copy the full SHA
    8e37808 View commit details
  3. Interactive progress bar

    During a build you can hit 'L' to enable/disable printing of build
    logs, 'v' or '+' to increase verbosity, and '-' to decrease verbosity.
    edolstra committed Nov 20, 2020
    Copy the full SHA
    637da1e View commit details
  4. Copy the full SHA
    8215446 View commit details
  5. Support multi-line status

    edolstra committed Nov 20, 2020
    Copy the full SHA
    325c74f View commit details
  6. Copy the full SHA
    e8bcb86 View commit details
  7. Doh

    edolstra committed Nov 20, 2020
    Copy the full SHA
    d7a2ed9 View commit details
  8. Cleanup

    edolstra committed Nov 20, 2020
    Copy the full SHA
    bd0e978 View commit details
  9. Style change

    edolstra committed Nov 20, 2020
    Copy the full SHA
    10686b0 View commit details
  10. Add activity for evaluation

    edolstra committed Nov 20, 2020
    Copy the full SHA
    ad36eab View commit details
  11. Show failure / evaluation

    edolstra committed Nov 20, 2020
    Copy the full SHA
    0d55a5a View commit details
  12. Copy the full SHA
    31cb988 View commit details
  13. Copy the full SHA
    45fa31a View commit details
  14. Show downloads

    edolstra committed Nov 20, 2020
    Copy the full SHA
    de00f74 View commit details
  15. Fix crash, tweaks

    edolstra committed Nov 20, 2020
    Copy the full SHA
    bb0a645 View commit details
  16. Copy the full SHA
    df4b4a8 View commit details
  17. Fix resetting the terminal with '-L'

    Using '-L' caused another call to setLogFormat(), which caused another
    ProgressBar to be created. But the ProgressBar should be a singleton.
    
    To do: remove LogFormat::barWithLogs. '-L' should be a setting of the
    ProgressBar, not a different log format.
    edolstra committed Nov 20, 2020
    Copy the full SHA
    b0ba75b View commit details
  18. Replace LogFormat::barWithLogs with a setting

    This will make it easier to add more settings to the progress bar.
    edolstra committed Nov 20, 2020
    Copy the full SHA
    bfb2b97 View commit details
  19. Move method

    edolstra committed Nov 20, 2020
    Copy the full SHA
    770eaf1 View commit details
  20. Move primeCache() to Worker::run()

    We need the missing path info to communicate the worker's remaining
    goals to the progress bar.
    edolstra committed Nov 20, 2020
    Copy the full SHA
    169e3e2 View commit details
  21. Copy the full SHA
    6d627ae View commit details
  22. Copy the full SHA
    3c91199 View commit details
  23. Spinner

    edolstra committed Nov 20, 2020
    Copy the full SHA
    7dcd446 View commit details
  24. Copy the full SHA
    d74cf49 View commit details
  25. Copy the full SHA
    0641d58 View commit details
  26. Progress bar: Handle verify

    edolstra committed Nov 20, 2020
    Copy the full SHA
    b839dc1 View commit details
2 changes: 1 addition & 1 deletion corepkgs/fetchurl.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ system ? "" # obsolete
, url
, hash ? "" # an SRI ash
, hash ? "" # an SRI hash

# Legacy hash specification
, md5 ? "", sha1 ? "", sha256 ? "", sha512 ? ""
2 changes: 1 addition & 1 deletion src/build-remote/build-remote.cc
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@ static int main_build_remote(int argc, char * * argv)
% concatStringsSep<StringSet>(", ", m.mandatoryFeatures);
}

logErrorInfo(lvlInfo, {
logErrorInfo(canBuildLocally ? lvlChatty : lvlWarn, {
.name = "Remote build",
.description = "Failed to find a machine for remote build!",
.hint = hint
13 changes: 11 additions & 2 deletions src/libexpr/eval-cache.cc
Original file line number Diff line number Diff line change
@@ -525,8 +525,17 @@ string_t AttrCursor::getStringWithContext()
cachedValue = root->db->getAttr(getKey(), root->state.symbols);
if (cachedValue && !std::get_if<placeholder_t>(&cachedValue->second)) {
if (auto s = std::get_if<string_t>(&cachedValue->second)) {
debug("using cached string attribute '%s'", getAttrPathStr());
return *s;
bool valid = true;
for (auto & c : s->second) {
if (!root->state.store->isValidPath(root->state.store->parseStorePath(c.first))) {
valid = false;
break;
}
}
if (valid) {
debug("using cached string attribute '%s'", getAttrPathStr());
return *s;
}
} else
throw TypeError("'%s' is not a string", getAttrPathStr());
}
2 changes: 2 additions & 0 deletions src/libexpr/flake/flake.cc
Original file line number Diff line number Diff line change
@@ -285,6 +285,8 @@ LockedFlake lockFlake(
{
settings.requireExperimentalFeature("flakes");

Activity act(*logger, lvlTalkative, actLockFlake);

FlakeCache flakeCache;

auto flake = getFlake(state, topRef, lockFlags.useRegistries, flakeCache);
11 changes: 7 additions & 4 deletions src/libexpr/flake/lockfile.cc
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ LockFile::LockFile(const nlohmann::json & json, const Path & path)
{
if (jsonNode.find("inputs") == jsonNode.end()) return;
for (auto & i : jsonNode["inputs"].items()) {
if (i.value().is_array()) {
if (i.value().is_array()) { // FIXME: remove, obsolete
InputPath path;
for (auto & j : i.value())
path.push_back(j);
@@ -87,10 +87,13 @@ LockFile::LockFile(const nlohmann::json & json, const Path & path)
std::string inputKey = i.value();
auto k = nodeMap.find(inputKey);
if (k == nodeMap.end()) {
auto jsonNode2 = json["nodes"][inputKey];
auto input = std::make_shared<LockedNode>(jsonNode2);
auto nodes = json["nodes"];
auto jsonNode2 = nodes.find(inputKey);
if (jsonNode2 == nodes.end())
throw Error("lock file references missing node '%s'", inputKey);
auto input = std::make_shared<LockedNode>(*jsonNode2);
k = nodeMap.insert_or_assign(inputKey, input).first;
getInputs(*input, jsonNode2);
getInputs(*input, *jsonNode2);
}
if (auto child = std::dynamic_pointer_cast<LockedNode>(k->second))
node.inputs.insert_or_assign(i.key(), child);
7 changes: 4 additions & 3 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
@@ -1132,9 +1132,10 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
However, we don't bother doing this for floating CA derivations because
their "hash modulo" is indeterminate until built. */
if (drv.type() != DerivationType::CAFloating)
drvHashes.insert_or_assign(drvPath,
hashDerivationModulo(*state.store, Derivation(drv), false));
if (drv.type() != DerivationType::CAFloating) {
auto h = hashDerivationModulo(*state.store, Derivation(drv), false);
drvHashes.lock()->insert_or_assign(drvPath, h);
}

state.mkAttrs(v, 1 + drv.outputs.size());
mkString(*state.allocAttr(v, state.sDrvPath), drvPathS, {"=" + drvPathS});
4 changes: 0 additions & 4 deletions src/libmain/loggers.cc
Original file line number Diff line number Diff line change
@@ -15,8 +15,6 @@ LogFormat parseLogFormat(const std::string & logFormatStr) {
return LogFormat::internalJSON;
else if (logFormatStr == "bar")
return LogFormat::bar;
else if (logFormatStr == "bar-with-logs")
return LogFormat::barWithLogs;
throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
}

@@ -30,8 +28,6 @@ Logger * makeDefaultLogger() {
return makeJSONLogger(*makeSimpleLogger(true));
case LogFormat::bar:
return makeProgressBar();
case LogFormat::barWithLogs:
return makeProgressBar(true);
default:
abort();
}
1 change: 0 additions & 1 deletion src/libmain/loggers.hh
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ enum class LogFormat {
rawWithLogs,
internalJSON,
bar,
barWithLogs,
};

void setLogFormat(const std::string & logFormatStr);
Loading