Skip to content

Commit e33cd5a

Browse files
committed
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.
1 parent b56e456 commit e33cd5a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libexpr/primops/fetchTree.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ static void fetchTree(
199199
if (state.settings.pureEval && !input.isLocked()) {
200200
if (input.getNarHash())
201201
warn(
202-
"Input '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. "
203-
"This is deprecated since such inputs are verifiable but may not be reproducible.",
202+
"Input '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. "
203+
"This is not reproducible and will break after garbage collection or when shared.",
204204
input.to_string());
205205
else
206206
state

src/libflake/lockfile.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ LockedNode::LockedNode(const fetchers::Settings & fetchSettings, const nlohmann:
7777
if (!lockedRef.input.isLocked() && !lockedRef.input.isRelative()) {
7878
if (lockedRef.input.getNarHash())
7979
warn(
80-
"Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. "
81-
"This is deprecated since such inputs are verifiable but may not be reproducible.",
80+
"Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. "
81+
"This is not reproducible and will break after garbage collection or when shared.",
8282
lockedRef.to_string());
8383
else
8484
throw Error(

0 commit comments

Comments
 (0)