-
Notifications
You must be signed in to change notification settings - Fork 110
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
entr
enhancements [feature suggestions]
#305
Comments
Yes, please make a PR. Note #308. |
@timholy Thanks, will do! |
As for (3) you might be interested in #443 . |
With #488 is merged, most of this is addressed. (1) is mostly addressed because functions (2) is not yet addressed, I think. |
I think (2) should be addressed as well, especially thanks to Lines 313 to 317 in 397db6d
Example: julia> mkdir("foo")
"foo"
julia> using Revise
julia> t = @async Revise.entr(["foo"], postpone=true) do
println("update")
end
Task (runnable) @0x00007feed259b820
# Watching a directory translates to watching file "" within directory itself ("/tmp/foo")
julia> Revise.watched_files
Dict{String,Revise.WatchList} with 1 entry:
"/tmp/foo" => WatchList(1.60578e9, Dict{String,Base.PkgId}(""=> [top-level]))
# File creation
julia> touch("foo/bar"); sleep(1)
update
# File creation, again
julia> touch("foo/baz"); sleep(1)
update
# File modification
julia> touch("foo/bar"); sleep(1)
update
# File deletion
julia> rm("foo/baz"); sleep(1)
update (I seem to recall that watching directories can behave differently on some systems...) |
Let's close this. Thanks for all who have contributed to |
Here are a few suggested features which would make
entr
more powerful:1 - pass the matched file as an argument to the callback function.
Something in the line of:
This would allow for more granular logic.
2 - allow passing folders, not just files. There's rarely a need to watch individual files, it's more like "all the files in this folder" (ideally recursively).
3 - it really shouldn't be blocking, but I assume that can be easily addressed with
@spawn
,@fetch
, etc.My use case would be something like this:
If you think they'd be useful I can make a PR.
The text was updated successfully, but these errors were encountered: