File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1317,14 +1317,22 @@ function __init__()
13171317 else
13181318 pushfirst! (REPL. repl_ast_transforms, revise_first)
13191319 # #664: once a REPL is started, it no longer interacts with REPL.repl_ast_transforms
1320- iter = 0
1321- # wait for active_repl_backend to exist
1322- while ! isdefined (Base, :active_repl_backend ) && iter < 20
1323- sleep (0.05 )
1324- iter += 1
1325- end
13261320 if isdefined (Base, :active_repl_backend )
13271321 push! (Base. active_repl_backend. ast_transforms, revise_first)
1322+ else
1323+ # wait for active_repl_backend to exist
1324+ # #719: do this async in case Revise is being loaded from startup.jl
1325+ t = @async begin
1326+ iter = 0
1327+ while ! isdefined (Base, :active_repl_backend ) && iter < 20
1328+ sleep (0.05 )
1329+ iter += 1
1330+ end
1331+ if isdefined (Base, :active_repl_backend )
1332+ push! (Base. active_repl_backend. ast_transforms, revise_first)
1333+ end
1334+ end
1335+ isdefined (Base, :errormonitor ) && Base. errormonitor (t)
13281336 end
13291337 end
13301338 if isdefined (Main, :Atom )
You can’t perform that action at this time.
0 commit comments