[Nix#9782] How to recover from "some outputs are unexpectedly invalid" error? #66

Open
opened 2024-03-16 06:44:44 +00:00 by lix-bot · 2 comments
Member

Upstream-Issue: NixOS/nix#9782

Problem

I ran into this error message. There are no relevant messages near to it, so I have no idea how to recover from it. Basically, the error message would have to answer all of the following to be useful:

  • Which paths?
  • What does "invalid" mean in this context?
  • Is the word "unexpectedly" even meaningful here? Is it possible for outputs to be expectedly invalid?
  • Which exact steps do I need to follow to recover?

Proposal

Checklist

Priorities

Add 👍 to issues you find important.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/9782 ## Problem I ran into [this error message](https://github.com/NixOS/nix/blob/8a2da82220ab0bd09b86e97fb108e5c300e057d4/src/libstore/build/derivation-goal.cc#L1513). There are no relevant messages near to it, so I have no idea how to recover from it. Basically, the error message would have to answer all of the following to be useful: - Which paths? - What does "invalid" mean in this context? - Is the word "unexpectedly" even meaningful here? Is it possible for outputs to be expectedly invalid? - Which exact steps do I need to follow to recover? ## Proposal <!-- propose a solution --> ## Checklist - [x] checked [latest Nix manual] \([source]) - [x] checked [open documentation issues and pull requests] for possible duplicates [latest Nix manual]: https://nixos.org/manual/nix/unstable/ [source]: https://github.com/NixOS/nix/tree/master/doc/manual/src [open documentation issues and pull requests]: https://github.com/NixOS/nix/labels/documentation ## Priorities Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
Owner

This can happen if you do (e.g.) nix build .#postgis --rebuild and the derivation hasn't been built yet. --rebuild instructs Nix to find the output and build it again, which it can't do when the output doesn't exist! We should just build the derivation, or at least fail with a sensible error message.

EDIT: This is completely wrong, this is a separate error.

~~This can happen if you do (e.g.) `nix build .#postgis --rebuild` and the derivation hasn't been built yet. `--rebuild` instructs Nix to find the output and build it again, which it can't do when the output doesn't exist! We should just build the derivation, or at least fail with a sensible error message.~~ EDIT: This is completely wrong, this is a separate error.
Owner

Oops, I didn't mean to close this. I hit tab the wrong amount of times.

Oops, I didn't mean to close this. I hit tab the wrong amount of times.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#66
No description provided.