From e33cd5aa38c5760b5c0cda08aad2b5e9eb7768ff Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 19 Oct 2025 14:08:34 +0200 Subject: [PATCH] Clarify unlocked input warning message The previous message was vague about what "deprecated" meant and why unlocked inputs with NAR hashes "may not be reproducible". It also used "verifiable" which was confusing. The new message makes it clear that the NAR hash provides verification (is checked by NAR hash) and explicitly states the failure modes: garbage collection and sharing. --- src/libexpr/primops/fetchTree.cc | 4 ++-- src/libflake/lockfile.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index ad76af5b5..b49bd02e7 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -199,8 +199,8 @@ static void fetchTree( if (state.settings.pureEval && !input.isLocked()) { if (input.getNarHash()) warn( - "Input '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. " - "This is deprecated since such inputs are verifiable but may not be reproducible.", + "Input '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. " + "This is not reproducible and will break after garbage collection or when shared.", input.to_string()); else state diff --git a/src/libflake/lockfile.cc b/src/libflake/lockfile.cc index d3dac19c5..d0d339f9f 100644 --- a/src/libflake/lockfile.cc +++ b/src/libflake/lockfile.cc @@ -77,8 +77,8 @@ LockedNode::LockedNode(const fetchers::Settings & fetchSettings, const nlohmann: if (!lockedRef.input.isLocked() && !lockedRef.input.isRelative()) { if (lockedRef.input.getNarHash()) warn( - "Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. " - "This is deprecated since such inputs are verifiable but may not be reproducible.", + "Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. " + "This is not reproducible and will break after garbage collection or when shared.", lockedRef.to_string()); else throw Error(