Skip to content

Commit 8ae1df3

Browse files
authored
Improve inference in a couple of spots (#566)
xref timholy/CodeTracking.jl#73
1 parent acdbaa4 commit 8ae1df3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/lowered.jl

+3-4
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,9 @@ function methods_by_execution!(@nospecialize(recurse), methodinfo, docexprs, mod
210210
local active_bp_refs
211211
if disablebp
212212
# We have to turn off all active breakpoints, https://github.com/timholy/CodeTracking.jl/issues/27
213-
bp_refs = JuliaInterpreter.breakpoints()
214-
if eltype(bp_refs) !== JuliaInterpreter.BreakpointRef
215-
bp_refs = JuliaInterpreter.BreakpointRef[]
216-
foreach(bp -> append!(bp_refs, bp.instances), bp_refs)
213+
bp_refs = JuliaInterpreter.BreakpointRef[]
214+
for bp in JuliaInterpreter.breakpoints()
215+
append!(bp_refs, bp.instances)
217216
end
218217
active_bp_refs = filter(bp->bp[].isactive, bp_refs)
219218
foreach(disable, active_bp_refs)

src/packagedef.jl

+5-3
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,10 @@ function revise_file_queued(pkgdata::PkgData, file)
593593
stillwatching = true
594594
while stillwatching
595595
if !file_exists(file) && !isdir(file)
596-
with_logger(SimpleLogger(stderr)) do
597-
@warn "$file is not an existing file, Revise is not watching"
596+
let file=file
597+
with_logger(SimpleLogger(stderr)) do
598+
@warn "$file is not an existing file, Revise is not watching"
599+
end
598600
end
599601
notify(revision_event)
600602
break
@@ -720,7 +722,7 @@ function revise(; throw=false)
720722

721723
# Do all the deletion first. This ensures that a method that moved from one file to another
722724
# won't get redefined first and deleted second.
723-
revision_errors = []
725+
revision_errors = Tuple{PkgData,String}[]
724726
queue = sort!(collect(revision_queue); lt=pkgfileless)
725727
finished = eltype(revision_queue)[]
726728
mexsnews = ModuleExprsSigs[]

0 commit comments

Comments
 (0)