From fcd60e938c2ce7f51fa885ddc94cf0bb04a5b83c Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 12 Apr 2020 12:00:53 +0200 Subject: [PATCH] Flip back to verbose output in nixpkgs_package Historically, the user was able to see the output of `nix-build` in real-time. This was useful, because building derivations can take a long time. Even if the binary cache can be used for all derivations, downloading can take a long time. Then #77 came along, which made `nix-build` quiet as a side-effect. Later, #86 subsumed #77 with a simpler implementation. However, people argued in #82 that being quiet is the right thing to do, because otherwise workspace rule output can garble the output of `bazel query` and break scripts. So we stuck to quiet output and this was called out in the v0.6 changelog. It turns out that the problem affects other rule authors too (see bazelbuild/rules_nodejs#583). This led to bazelbuild/bazel#10611, which fixes the problem for everyone, and shipped in Bazel 3.0. Now, all workspace rule output goes to `stderr`, so scripts calling `bazel query` shouldn't be affected. Given this upstream change, my position is that being verbose is now the right thing to do. If #85 is implemented, then being verbose should remain the default, at least for users of Bazel 3.0 onwards. Because even small packages may have a large set of dependencies that must be downloaded first. It's nigh impossible for the author of the workspace file to anticipate the state of the user's cache. --- nixpkgs/nixpkgs.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/nixpkgs/nixpkgs.bzl b/nixpkgs/nixpkgs.bzl index 6e0590d23..b1287349e 100644 --- a/nixpkgs/nixpkgs.bzl +++ b/nixpkgs/nixpkgs.bzl @@ -162,6 +162,7 @@ def _nixpkgs_package_impl(repository_ctx): failure_message = "Cannot build Nix attribute '{}'.".format( repository_ctx.attr.attribute_path, ), + quiet = False, timeout = timeout, ) output_path = exec_result.stdout.splitlines()[-1]