Skip to content

Commit 3522915

Browse files
committed
Turn off trace messages (when checkMaterialization is disabled) to not bother user
1 parent 3a81e80 commit 3522915

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/materialize.nix

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,21 @@ let
4747
(traceIgnoringMaterialized reasonNotSafe calculateNoHash)
4848
else if materialized != null
4949
then calculateUseMaterialized
50-
else if sha256 != null
51-
then
52-
# Let the user know how to materialize if they want to.
53-
builtins.trace materializeMessage calculateUseHash
54-
else # materialized == null && sha256 == null
55-
# Let the user know how to calculate a sha256 or materialize if they want to.
56-
builtins.trace sha256message (builtins.trace materializeMessage calculateNoHash);
50+
# Turn off trace messages when checkMaterialization is disabled to not bother user.
51+
else if checkMaterialization
52+
then if sha256 != null
53+
then
54+
# Let the user know how to materialize if they want to.
55+
builtins.trace materializeMessage calculateUseHash
56+
else # materialized == null && sha256 == null
57+
# Let the user know how to calculate a sha256 or materialize if they want to.
58+
builtins.trace sha256message (builtins.trace materializeMessage calculateNoHash)
59+
else x: x;
5760

5861
# Build fully and check the hash and materialized versions
5962
checked =
6063
# Let the user know what we are checking. This is useful for debugging issues
61-
# where materialization fails to prevent infinite recurstion when:
64+
# where materialization fails to prevent infinite recursion when:
6265
# checkMaterialization = true;
6366
(if materialized != null
6467
then __trace "Checking materialization in ${toString materialized}"

0 commit comments

Comments
 (0)