--check or --rebuild should automate recovery when feasible #1067

Open
opened 2025-12-06 19:26:47 +00:00 by raito · 1 comment
Owner

In general, if the target path to be reproduced does not exist, I'd like Lix to automatically build the derivations if the recipe is known in the context (passed as an argument or something).

Describe the solution you'd like

Lix should verify if the path info is missing, if it is, determine if it has enough information to schedule a normal build goal.
Once the path info is determined to be correct, Lix should schedule the original check build goal.

If the path info is corrupted, Lix should only schedule a repair build goal ONLY IF --repair is passed.

Describe alternatives you've considered

Automate it outside of Lix.

Additional context

This is the the ideal version of #485 extracted as a feature request.

## Is your feature request related to a problem? Please describe. In general, if the target path to be reproduced does not exist, I'd like Lix to automatically build the derivations if the recipe is known in the context (passed as an argument or something). ## Describe the solution you'd like Lix should verify if the path info is missing, if it is, determine if it has enough information to schedule a normal build goal. Once the path info is determined to be correct, Lix should schedule the original check build goal. If the path info is corrupted, Lix should only schedule a repair build goal ONLY IF `--repair` is passed. ## Describe alternatives you've considered Automate it _outside_ of Lix. ## Additional context This is the the ideal version of #485 extracted as a feature request.
Owner

how would we do this? ioo it makes little sense for either of them to quietly build things. --rebuild is a rebuild, if it falls back to building twice it's kind of confusing, and if it falls back to building normally we're not even doing what the user asked. --check is pretty similar. the other option is to substitute if some outputs are missing and then check those, but that too may be confusing because why would it do that?

maybe we should restrict the checks to available outputs instead, but then we no longer even have the chance to diagnose indeterminism in incompletely built derivations (eg because they were substituted from a remote builder). none of this works particularly well without extending the cli

how would we do this? ioo it makes little sense for either of them to quietly build things. `--rebuild` is a ***re***build, if it falls back to building twice it's kind of confusing, and if it falls back to building normally we're not even doing what the user asked. `--check` is pretty similar. the other option is to *substitute* if some outputs are missing and then check those, but that too may be confusing because why would it do that? maybe we should restrict the checks to available outputs instead, but then we no longer even have the chance to diagnose indeterminism in incompletely built derivations (eg because they were substituted from a remote builder). none of this works particularly well without extending the cli
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#1067
No description provided.