mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
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.
This commit is contained in:
parent
b56e456b0d
commit
e33cd5aa38
2 changed files with 4 additions and 4 deletions
|
|
@ -199,8 +199,8 @@ static void fetchTree(
|
||||||
if (state.settings.pureEval && !input.isLocked()) {
|
if (state.settings.pureEval && !input.isLocked()) {
|
||||||
if (input.getNarHash())
|
if (input.getNarHash())
|
||||||
warn(
|
warn(
|
||||||
"Input '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. "
|
"Input '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. "
|
||||||
"This is deprecated since such inputs are verifiable but may not be reproducible.",
|
"This is not reproducible and will break after garbage collection or when shared.",
|
||||||
input.to_string());
|
input.to_string());
|
||||||
else
|
else
|
||||||
state
|
state
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ LockedNode::LockedNode(const fetchers::Settings & fetchSettings, const nlohmann:
|
||||||
if (!lockedRef.input.isLocked() && !lockedRef.input.isRelative()) {
|
if (!lockedRef.input.isLocked() && !lockedRef.input.isRelative()) {
|
||||||
if (lockedRef.input.getNarHash())
|
if (lockedRef.input.getNarHash())
|
||||||
warn(
|
warn(
|
||||||
"Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but does have a NAR hash. "
|
"Lock file entry '%s' is unlocked (e.g. lacks a Git revision) but is checked by NAR hash. "
|
||||||
"This is deprecated since such inputs are verifiable but may not be reproducible.",
|
"This is not reproducible and will break after garbage collection or when shared.",
|
||||||
lockedRef.to_string());
|
lockedRef.to_string());
|
||||||
else
|
else
|
||||||
throw Error(
|
throw Error(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue