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

Don't rerun nix-build when nothing has changed #7

Open
matthewbauer opened this issue Aug 11, 2017 · 4 comments
Open

Don't rerun nix-build when nothing has changed #7

matthewbauer opened this issue Aug 11, 2017 · 4 comments
Assignees

Comments

@matthewbauer
Copy link
Contributor

matthewbauer commented Aug 11, 2017

Currently, if you have a failing nix-build result, nix-buffer will continually try to run (when used as a find-file-hook). We should try to "mark" these failing builds once and avoid rebuilding until the inputs change.

@shlevy
Copy link
Owner

shlevy commented Aug 12, 2017

👍 one way to do this is to cache the most recent failed drv path in the cache dir and check it before running the build.

@matthewbauer
Copy link
Contributor Author

So, can you get the drv path from a failed nix-build call? I've looked into it and it looks like the easiest way is to call nix-instantiate to get a drv then run nix-store -r to build it. The thing is that doesn't seem to setup the out-link stuff that nix-buffer uses. But, maybe we don't need that if we can just store drv paths.

@shlevy
Copy link
Owner

shlevy commented Aug 14, 2017

You can set up out-link stuff with nix-store. See the --add-root and --indirect flags.

@shlevy shlevy self-assigned this Sep 23, 2022
@shlevy shlevy moved this to Todo in nix-buffer flakes Sep 23, 2022
@shlevy
Copy link
Owner

shlevy commented Sep 23, 2022

Will take this up in the flake mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants