-
Notifications
You must be signed in to change notification settings - Fork 107
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 wait for nix show-derivation when deciding whether to provide UI feedback #835
Conversation
…rovide UI feedback
…ic-responsiveness
Currently experimenting with using hnix to parse and evaluate the static asset derivation, with the hope of only watching the files that the evaluation cares about. That'll get rid of all this |
Related: haskell-nix/hnix#804 Once that PR is done, we can try to use that functionality to implement a more nuanced nix watcher. |
5861c58
to
c254893
Compare
Not doing this. |
Before this patch, we diffed the output of
nix show-derivation
to determine whether to attempt to rebuild thestaticFiles
derivation. Unfortunately,show-derivation
often takes a significant amount of time and seems to do much of the same work involved in building the derivation. While we're waiting for the results ofshow-derivation
to decide whether to embark upon and notify the user of an asset rebuild, the user gets no indication that we've noticed their change.The tradeoff with this patch is that we'll be a little noisier: changes that don't actually impact the derivation but are within the project directory will cause no-op rebuilds for which the user will receive notifications. However, this is probably superior to a long, brooding silence while we determine whether to rebuild or not. To mitigate the problem, we ignore some common temp files that editors leave lying around, and limit our file-watching to the frontend, common, backend, and static folders.
I have:
develop
branchhlint .
(lint found code you did not write can be left alone)$(nix-build -A selftest --no-out-link)
nix-build release.nix -A build.x86_64-linux --no-out-link
(orx86_64-darwin
on macOS)