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: redo-watch #5

Open
bukzor opened this issue Aug 20, 2017 · 3 comments
Open

proposal: redo-watch #5

bukzor opened this issue Aug 20, 2017 · 3 comments

Comments

@bukzor
Copy link

bukzor commented Aug 20, 2017

One feature of "modern" build systems is the ability to watch for changes in source files, then automatically invoke the build system in response. This is generally done via inotify, at the cost of making it linux-specific.

How do you feel about this feature? Would it fit better in this repo, or a fork, or as some kind of credo extension? Do you care about macos/windows support?

A bit of research on how this might be implemented in a skalibs-based project:

  • skarnet only has one example of anything similar, and it's linux-only and filed into a "*-linux" package.
  • I was unable to find a C library that abstracts the problem of watching files across operating systems. The closest thing was libfswatch, but it still had lots of caveats.
@drwilly
Copy link
Owner

drwilly commented Aug 20, 2017

The scope of this project is POSIX. I'm not fundamentally opposed to windows, but I don't own a windows system and I don't intend to change that. So all development effort would have to come from someone else.

How I feel about this feature? Mh. Honestly I'm kinda skeptical.
In it's most trivial form it would parse the .prereqs-files, monitor everything thats listed under 'source' and run redo all when a file changes.
But that seems like an aweful lot for effort to replace a few keystrokes.
An advanced version would be gather the dependency-tree and run builds selectively.
For that to make a difference it you'd need a pretty huge project where the dependency-checking alone would take significant amounts of time. Which then raises the question: Do you really wanna rebuild everytime you save a file?

The trivial version I would definitly see as a seperate project since it would be pretty general-purpose.
Think find dir/ | inotify-daemon echo "file {} changed!"
The advanced version would probably need to be credo-specific.

@bukzor
Copy link
Author

bukzor commented Aug 21, 2017

Thanks for your considered response!

I certainly don't want to redo all whenever a file changes. I think that's what you intended in the trivial solution?

I want redo-watch foo to behave exactly like redo foo but then continue to run and recompile foo and/or its dependencies when necessary. That sounds like it necessarily is credo-specific. It sounds like you're not keen to put it in this project; that's understandable :) Do you want to figure out some kind of extension strategy, or should I keep this in a fork?

@drwilly
Copy link
Owner

drwilly commented Aug 21, 2017

If you wanna start hacking, just fork.
We can figure out the organisatorial details later.
Hooray git.

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

2 participants