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

Support user-specified callbacks (v2) #488

Merged
merged 3 commits into from
May 24, 2020

Conversation

ffevotte
Copy link
Collaborator

This PR extends and replaces #443, which it puts into a (hopefully) mergeable state:

  • commits are squashed to simplify history, while preserving authorship
  • it is merged with current master (as of 953b638)

CC: @timholy @tkluck

tkluck and others added 3 commits May 24, 2020 14:49
This feature is one half of what `Revise.entr` already does. The
function `entr` allows the user to install callbacks for when
a file or module changes, and also enters a blocking loop
that catches any errors that might arise from the callbacks.

This new `add_callback` function allows installing callbacks and keeping
them around in the background. This commit also reimplements
`entr` in terms of `add_callback` and `remove_callback`, and adds tests.
`Revise.track(mod)` is still called on the module, in case we're adding a
callback for `Base` or an other package compiled in the system image.
@tkluck
Copy link
Contributor

tkluck commented May 24, 2020

This looks very good to me. Thanks for taking this home @ffevotte !

@timholy
Copy link
Owner

timholy commented May 24, 2020

Thanks so much for doing this! Really excited to see this well fleshed-out.

I notice that all the OSX tests passed, something that's been a little rare lately. I wonder if this may have fixed the annoying flakiness on OSX. I'll test in an additional PR.

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

Successfully merging this pull request may close these issues.

3 participants