-
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
Allow Revise to be loaded in -e/E arguments #349
base: master
Are you sure you want to change the base?
Conversation
Also, with this patch, I think the recommended way to load Revise in the atreplinit() do repl
try
@eval using Revise
@async Revise.wait_steal_repl_backend()
catch
end
end then the following happens
But if you just have |
Ah, the warning showed up. It was the same one that @mlhetland mentioned in #202 (comment). I had
|
Can we wrap this in an |
Codecov Report
@@ Coverage Diff @@
## master #349 +/- ##
==========================================
- Coverage 76.88% 76.83% -0.05%
==========================================
Files 11 11
Lines 1168 1170 +2
==========================================
+ Hits 898 899 +1
- Misses 270 271 +1
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #349 +/- ##
==========================================
- Coverage 76.88% 76.83% -0.05%
==========================================
Files 11 11
Lines 1168 1170 +2
==========================================
+ Hits 898 899 +1
- Misses 270 271 +1
Continue to review full report at Codecov.
|
Ok, I've tested this wrapped version and it seems to work great. The warning is gone and loading Revise in either Are there any tests that should/could be added for this? |
Yes please. I suspect the best approach would be in the I haven't yet played with this myself, but any preliminary thoughts about whether this affects people who have been adding the recommended lines to their |
@timholy Did you mean like this?
I have been running Revise with essentially this patch (sans the
Base.isinteractive
check) for quite a while now and everything has been working fine.At some point, I did see an issue when I would get some warnings with scripts (i.e. running
julia script.jl
). I don't remember exactly, but I think it was about stealing the REPL when there isn't one when I hadusing Revise
in the startup file. But I wasn't able to reproduce that anymore. And hopefully theBase.isinteractive
check will get around that?As far as I can tell, this definitely fixes #202, i.e.
julia -i -e 'using Revise; includet("script.jl")'
now works as expected.