nix-instantiate --eval ambigously fails to create -source storepath #271
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
awaiting
author
awaiting
contributors
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
Feature/S3
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#271
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?
Describe the bug
nix-instantiate --evalsetssettings.readOnlyModetoo opportunistically,and this makes lix sad because here
we silently noop
fetchToStoreifreadOnlyModeinstead oftelling the user if we computed path and it isn't already there.
with
--read-write-mode,readOnlyModeis not set, and everything is happy (:there are two bugs here: (1) silent fetchToStore noop in r/o mode (2)
--read-write-modeis annoying to writeSteps To Reproduce
nix --versionoutputnix (Lix, like Nix) 2.90.0-lixpre20240504-8dfb30aAdditional context
cppnix also has (some?) of this bug.
previous: #270
This issue was mentioned on Gerrit on the following CLs:
does this issue still persist?
maybe, depending on how it's defined, what
cl/1160did is improve the error message, but @midnightveil calls the whole codepath "only possible if internal invariants are violated?".. So I think there is some debugging, to understand where we can throw a clearer error that points towards what was done wrong with some trace/location reporting.This is very annoying because it requires re-architecturing to achieve well. All these APIs that switch case based on whether store can be W or not are forced to perform a pure computation of the store path letting the caller honors the fact that the path already exist or manifest it somehow later.
I think this issue should be split into smaller pieces, e.g. rework the overall read-only mode and the various caller assumptions. From there, we can tackle this.