-
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
Error in multiple environments #205
Comments
Thanks for a great bug report. I'll look into it while also working on #146. |
So, it turns out this is the same as JuliaLang/julia#27418. Until that's fixed, the perfect fix here doesn't exist. The only one that would be robust would be to run Revise in "eager-parsing" mode, meaning that for every package you use, it parses the entire cache file immediately rather than waiting until something changes. Except for race conditions between two Julia sessions, that would "free" Revise from depending on the source-text cache. The downside of such a workaround is that Revise will be a heavier dependency, because it will do a lot more parsing. To prevent the cost from affecting everyone, I can make a switch that you can set in your diff --git a/src/pkgs.jl b/src/pkgs.jl
index 60c2c16..a51226b 100644
--- a/src/pkgs.jl
+++ b/src/pkgs.jl
@@ -83,6 +83,7 @@ function parse_pkg_files(id::PkgId)
# For precompiled packages, we can read the source later (whenever we need it)
# from the *.ji cachefile.
pkgdata.fileinfos[fname] = FileInfo(mod, path)
+ maybe_parse_from_cache!(pkgdata, fname)
push!(files, fname)
end
return files If you like it, a PR to enable it via a switch would be welcome (or I will do it if you ask), e.g., like those here. |
Thank you. I've changed my workflow to deal with the issue otherwise, so I don't need it at the moment. |
I'll close this since the best fix is just to fix JuliaLang/julia#27418. |
I'm experiencing a similar issue, though under different circumstances (I haven't looked into consistently reproducing it yet, but my setup is not consistent with that described above). |
This is a won't-fix in Revise (the fix would absolutely cripple Revise for the majority of users), so you'll need to find another workaround. |
When I have multiple terminals open in different environments, I frequently get errors of the form
I can reproduce this consistently, by doing:
using Revise, Foo
in the default environment, where Foo isdev
edactivate OtherEnv; using Foo
. Foo is notdev
ed in this environment (eg. onFoo#master
)Foo
's source codeThe text was updated successfully, but these errors were encountered: