-
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
Rewrite, postpone and pause #308
Conversation
The function is now executed initially as well, unless postpone=true.
Now entr will trigger also if a file is overwritten by the renaming of another.
entr will now pause between being triggered and actually executing, to handle small clusters of modifications to a single file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like all of these changes! Thanks for keeping them in separate PRs, when merged let's keep them that way.
Feel free to add any tests that you want. If some behaviors are difficult to test, I'll leave it up to your judgement to decide where to draw the line; let me know when you want this merged and I'll do it.
Co-Authored-By: Tim Holy <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 75.63% 75.66% +0.02%
==========================================
Files 11 11
Lines 1133 1134 +1
==========================================
+ Hits 857 858 +1
Misses 276 276
Continue to review full report at Codecov.
|
3 similar comments
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 75.63% 75.66% +0.02%
==========================================
Files 11 11
Lines 1133 1134 +1
==========================================
+ Hits 857 858 +1
Misses 276 276
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 75.63% 75.66% +0.02%
==========================================
Files 11 11
Lines 1133 1134 +1
==========================================
+ Hits 857 858 +1
Misses 276 276
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 75.63% 75.66% +0.02%
==========================================
Files 11 11
Lines 1133 1134 +1
==========================================
+ Hits 857 858 +1
Misses 276 276
Continue to review full report at Codecov.
|
There should probably be a couple of added tests in the |
If you think it will be a long time, like I said I'm willing to merge this now and risk breakage later. I kind of think of Just let me know what you want me to do. |
I'm fine with that. I guess if there's a bug that needs fixing, we could add a test provoking that bug, anyway :-) |
Technically this is breaking (previously we effectively had |
Yes, I thought about that, too (specifically the But despite being (mildly) breaking, the fix ( That reminds me: I didn't modify any documentation (beyond the docstring itself). If it's mentioned elsewhere, that should probably also be changed? |
Improvement to the documentation would be most welcome. Note #311, which I think is due to JuliaInterpreter not working on nightly. (I guess fixing that should be my next priority.) |
This PR has three minor modifications to
entr
(cf. #298):entr
will now executef()
initially, unless thepostpone
keyword is used;entr
sleeps for the amount given bypause
between being triggered and executingf()
, to handle clusters of modifications, such as text editor saves; andThe first and last are in line with the
entr
command line tool. The second is an added convenience, to avoid redundant execution when (e.g.) generating output based on saved files, etc.The modifications are independent – no need to accept them all.
(Note: No new tests have been added for these features.)