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

Proposal: watch mode #1683

Open
rtc11 opened this issue Dec 16, 2024 · 1 comment
Open

Proposal: watch mode #1683

rtc11 opened this issue Dec 16, 2024 · 1 comment
Labels
Enhancement Request New feature or request

Comments

@rtc11
Copy link

rtc11 commented Dec 16, 2024

A very common workflow in modern software development is to use a "watch-mode" to trigger automatic rebuild/test/compile/run every time a watched file is changed.

There are some considerations:

  1. should the watch-mode work with projects only. This way it is possible to look up for new and deleted files.
  2. should it work for compile-* commands also? This would be more primitive only looking for specified files in the command.

To be cross-platform, this requires interaction with the file-systems-metadata on every platform.
The hard part is to test this, as it might need manual testing on different architectures.

GHA supports some major platforms, I also found this Github Action for BSD that utilies qemu:
https://github.com/cross-platform-actions/action

Another solution is to use a third-party library as a temporary solution, e.g. https://github.com/SpartanJ/efsw

@stefanos82
Copy link

I think the watch flag would be an overkill for a statically typed programming language, because it has to go through multiple phases during compilation and run procedure.

Personally I have mapped a hotkey in Vim editor to run c3c run -q which compiles and runs almost instantly, which is not exactly what you are looking for, but it works just as fine as a watch flag.

@lerno lerno added the Enhancement Request New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants