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

Cancel command when dependencies change? #513

Open
bojidar-bg opened this issue Jan 10, 2025 · 0 comments
Open

Cancel command when dependencies change? #513

bojidar-bg opened this issue Jan 10, 2025 · 0 comments

Comments

@bojidar-bg
Copy link
Contributor

I'm using Tup for building a static website, and a few of the jobs are a lot slower compared to others (e.g. generating a PDF file vc copying a few HTML files as-is).
Unfortunately, while typing, I tend to habitually press save, which in turn would fire off the slow tasks, and tup would buffer any later updates until they are all completed. This tends to get in the way when I'm iterating on a file quickly.

So, to alleviate that issue, I would like to be able to tell Tup to send a SIGINT to a command if it sees that its dependencies have changed, since it is going to need to run that command again once it's completed anyway.
I would imagine this would also be useful to others who have a Tup monitor running with autoupdate, since there's limited utility to have a full build completed if it's already outdated once it's done.

Implementation-wise, I could see this being either:

  • a .tup/options option, e.g. monitor.cancel_updates or updater.cancel_on_change
  • a per-command option, e.g. : interruptible foreach foo.c bar.c | foo.h |> gcc -c %f -o %o |> %B.o
  • or perhaps, if a bit of compatibility breakage is considered worth it, the default Tup behavior.
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