Possible for --arg
to never apply, generating no warnings #775
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#775
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
nix eval --arg
and--arg
in general is cursed. It automatically calls any functions encountered that accept the given argument as a formal parameter, but not if it is accepted asargs@{...}
.This is itself confusing, but what is MORE confusing is that Lix doesn't produce a diagnostic that the argument was not used.
We should produce a diagnostic once autocall is done doing its thing if it doesn't actually use the argument in the end.
See this "fun" for other amusement that autocall generates. It's not a good feature. But we should stop shooting users in the foot with it unnecessarily. #263
nix-build
/nix-instantiate
will silently ignore unknown arguments being passed with--arg
#865Moving over my remark from #865
That doesn't sound like it is unreasonable to emit a diagnostic for in nearly every case, unless people have come to not just rely on this behavior by accident, but as intentional design (ie, they would get spammed with warnings from that).
There is however the question, do we want people to rely on this design? Can we come up with a timeline along which we can eventually turn that diagnostic into a hard error, even if it is going to sometimes painful as we only know it at the far end of eval that we have not consumed all the args. Obviously this may be a hard no due to how bad of a design choice originally was made.