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

Notify build system on rebuild #53

Open
Profpatsch opened this issue Jun 21, 2021 · 1 comment
Open

Notify build system on rebuild #53

Profpatsch opened this issue Jun 21, 2021 · 1 comment

Comments

@Profpatsch
Copy link
Collaborator

When you use e.g. a Makefile for building your project’s dependencies, and you change your shell.nix, you’d want your build system to pick up the change.

There is no good synchronous solution here I think, since you can either

  • wrap every command in nix-shell and have the overhead
  • have some kind of symlink directory in your build directory that your build system depends on, which links to all the tools (maybe?)
  • make lorri touch a file once it finishes building, leading to invalidation of the build system

I feel like the last point is pretty easy to implement, you could tell lorri to touch e.g. .build/latest-lorri-eval and then depend on it in your makefile. It is racy of course, but better than if the build system never notices that something changed.

@Profpatsch
Copy link
Collaborator Author

Maybe there could even be a way to block the build system until the rebuild is finished? That would trade speed for correctness, but if you e.g. changed one of your code generation tools you really want to wait on it to be available.

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