-
Notifications
You must be signed in to change notification settings - Fork 111
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
Revise stops tracking a file/module mid-session #459
Comments
Hmm, interesting. This may be a failure of Julia's FileWatching, not sure. Maybe it would be easiest to snoop on Revise's monitoring of the files? Presuming that you get this: julia> Revise.watching_files[]
false then the right function to spy on is Conversely, if you do keep getting notified of changes but Revise doesn't update the package, it implies a fault in Revise. It would be worth looking at |
|
I should also mention that #449 might be interesting in your debugging efforts, you could try checking out that branch. However it may also generate some spurious warnings (e.g., if you delete a source file). |
Indeed, a simple print statement tells me that I also finally managed to find a simple test case that reliably reproduces this, at least on my machine:
I |
Your test case was extremely useful. This is actually a pretty "deep" bug, one that comes down to how Julia itself handles Tasks: JuliaLang/julia#25790 (comment). It would be better to implement a fix in Julia itself, |
Instead of restarting new Tasks for file-watching, this introduces a loop. This seems a little easier to reason about, but this is mostly cosmetic. Inspired by investigating #459, but this does not fix it.
Instead of restarting new Tasks for file-watching, this introduces a loop. This seems a little easier to reason about, but this is mostly cosmetic. Inspired by investigating #459, but this does not fix it.
I have a script that imports a local module and does something with it, and my usual work flow is editing the module with a text editor and
including
the script from the REPL after each edit. Revise usually keeps track of the changes to the module, but I've been intermittently running into cases where suddenly for no apparent reason Revise stops revising. No changes to the file I've been editing, or at least in my current case any file in the same module, are registered any more. Changes to files from other modules still are. I've found no way around this other than restarting my session.The changes that I'm making should not be anything particularly odd, no macros, generated functions or type changes are involved.
Revise's logs show the last two entries being a
DeleteMethod
and anEval
for the method that the last succesfull edit was for. I'm not familiar with how the logs usually look like, but nothing seems obviously amiss to me. For what it's worth,all(e.group == "Action" for e in rlogger.logs)
returnstrue
.Revise.revise()
does nothing,Revise.revise(ModuleBeingEdited)
spits out a long list ofReplacing docs
log messages, but doesn't help the situation.Revise.watched_files
includes the correct folder and the file I'm trying to edit.I'm running Revise 2.6.0, Julia 1.4, and Ubuntu 19.10. The problem isn't brand new, I was already having it for instance on Julia 1.3.
The above probably isn't enough to solve this, but please give me directions of what to do and check to debug this further.
The text was updated successfully, but these errors were encountered: