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

handling stale functions #46

Closed
getzdan opened this issue Sep 15, 2017 · 1 comment · Fixed by #57
Closed

handling stale functions #46

getzdan opened this issue Sep 15, 2017 · 1 comment · Fixed by #57

Comments

@getzdan
Copy link

getzdan commented Sep 15, 2017

When changing a source file, sometimes you change the signature of functions. Revise defines the new functions, but the old functions still pollute the run-time. Many times, the source still includes calls to the old function signature (because nobody remembers to change all calls), so they silently run. Having just encountered such a potential pitfall, I'm putting it out here.

In any case, if functions from a Module / file could be identified in the run-time, then all functions from a "revised" file about to be run, can be redefined to indicate them being stale. And then the redefinitions would overwrite them again.

This problem doesn't necessarily have a simple solution, or one which should be under Revise.jl.

@timholy
Copy link
Owner

timholy commented Sep 15, 2017

See JuliaLang/julia#20048. Without @uncallable, it should be possible for Revise to notice that a method has been deleted and then redefine it so that calling it is an error. Unfortunately, that won't help in cases where you're deleting a more specific method and replacing it with a more generic method.

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 a pull request may close this issue.

2 participants