Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the first build crashes, discovered nix files are not watched #88

Open
Profpatsch opened this issue Jun 29, 2022 · 0 comments
Open

Comments

@Profpatsch
Copy link
Collaborator

Describe the bug
We are using a separate .toml file in our project, which gets loaded into the shell.nix (builtins.fromTOML`) where most of the packages are added.

Now if I start the lorri build loop for this project, and the first build fails, lorri will not pick up the paths from that build, meaning if I fix the issue in the .toml the lorri build will not restart.

To Reproduce
Steps to reproduce the behavior:

create a shell.nix:

import ./foo.nix

create foo.nix:

let pkgs = import <nixpkgs> {};
in pkgs.mkShell {
   buildInputs = [ pkgs.this-does-not-exist ];
}

tell the lorri daemon to pick up this project (make sure it hasn’t tried to evaluate it before while runnning, otherwise restart the lorri daemon to clean its cache). Running lorri watch should also work.

Watch the build fail, then change foo.nix to

let pkgs = import <nixpkgs> {};
in pkgs.mkShell {
   buildInputs = [ pkgs.hello ];
}

Note that the build does not restart.

Expected behavior

lorri should use the info it gained even in the failing build to watch the nix files it discovered in the first run, so that when we re-run it can pick up where it failed before.

Bonus points for also working if there’s a syntax error in foo.nix.

If it’s not possible to do that, there should be a per-project option to tell lorri which set of files to watch.

@Profpatsch Profpatsch changed the title If the first build crashes, discovered nix files are discarded If the first build crashes, discovered nix files are not watched Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant