-
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
Fix Revise on 0.7 #48
Conversation
The changes in module-loading seem to make it necessary to delay "asking" for the module---it doesn't seem to be available until after the __init__ method finishes running.
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
+ Coverage 83.27% 84.86% +1.59%
==========================================
Files 1 1
Lines 299 304 +5
==========================================
+ Hits 249 258 +9
+ Misses 50 46 -4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
+ Coverage 83.27% 84.86% +1.59%
==========================================
Files 1 1
Lines 299 304 +5
==========================================
+ Hits 249 258 +9
+ Misses 50 46 -4
Continue to review full report at Codecov.
|
On OSX, EDIT: but it does return when I touch a file in it. |
julia> Revise.watch_files_via_dir("/tmp/nodir")
ERROR: KeyError: key "/tmp/nodir" not found
Stacktrace:
[1] getindex at ./dict.jl:474 [inlined]
[2] watch_files_via_dir(::String) at /home/tim/.julia/v0.6/Revise/src/Revise.jl:521 (That's triggered when I delete the directory.) |
Then isn't that where the test failure comes from? |
Fixes a test failure on Windows
I see, thanks for explaining. Curiously, it did pass tests on some OSX installations, but not others. Let's just skip that test on OSX, then. Windows was failing for an independent reason (only on 0.7), let's see if the latest works on all platforms. |
Might be timing-dependent: |
JuliaLang/julia#23579 changed how modules are loaded, and for Revise's purposes the important change appears to be that the module isn't externally available while its
__init__
method is being run or whenBase.package_callbacks
are being run. This@schedule
s Revise's workflow until after module definition is completely finished. @JeffBezanson, is this correct (and intended)? The first commit is the one that implements the fix.Also fixes some deprecations, and attempts to fix test failures on OSX (I'm just guessing here). CC @cstjean