Skip to content

Commit 373df4b

Browse files
committed
Move PkgFiles code to separate file. Fixes #4.
1 parent 1bcc562 commit 373df4b

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/CodeTracking.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ using UUIDs
77
export PkgFiles
88
export whereis, definition, pkgfiles
99

10-
include("data.jl")
10+
include("pkgfiles.jl")
1111
include("utils.jl")
1212

13+
### Global storage
14+
15+
# These values get populated by Revise
16+
17+
const method_info = IdDict{Type,Tuple{LineNumberNode,Expr}}()
18+
19+
const _pkgfiles = Dict{PkgId,PkgFiles}()
20+
21+
const method_lookup_callback = Ref{Any}(nothing)
22+
23+
### Public API
24+
1325
"""
1426
filepath, line = whereis(method::Method)
1527

src/data.jl renamed to src/pkgfiles.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# The variables here get populated by Revise.jl.
2-
31
"""
42
PkgFiles encodes information about the current location of a package.
53
Fields:
@@ -32,9 +30,3 @@ function Base.show(io::IO, info::PkgFiles)
3230
print(io, " files: ")
3331
show(io, info.files)
3432
end
35-
36-
const method_info = IdDict{Type,Tuple{LineNumberNode,Expr}}()
37-
38-
const _pkgfiles = Dict{PkgId,PkgFiles}()
39-
40-
const method_lookup_callback = Ref{Any}(nothing)

0 commit comments

Comments
 (0)