Add special error message for empty derivation file#15298
Add special error message for empty derivation file#15298Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
|
Can you put the check at Line 1194 in 3bf690a This is better separation of concerns: Ideally we'd only do the warning for LocalFSStore too, but that seems a bit too much work to me, so I think putting it in the method implementation shared across all stores that I linked above is fine. |
|
You'll want to make it a |
8d10d50 to
eb875b7
Compare
|
I'm not sure if it should be a strictly |
This rather commonly occurs when the computer was uncleanly shut down and fsync was not enabled. Show the user a more actionable message than "expected string 'D'".
eb875b7 to
c33c82f
Compare
Ericson2314
left a comment
There was a problem hiding this comment.
Ah, good point about bad drv file somewhere else!
This rather commonly occurs when the computer was uncleanly shut down and fsync was not enabled. Show the user a more actionable message than "expected string 'D'".
Motivation
It would be better if we didn't rely on someone in the Matrix channel telling people they have FS corruption due to an unclean shutdown.
This message doesn't try to tell the user how to fix it, since it can be kind of tricky. See #11148.
This message also doesn't try to catch all errors thrown by the parsing function. Some of them can be caused by version mismatches instead, where trying to fix store corruption would be the wrong direction.
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.