Skip to content

Commit a449533

Browse files
committed
PkgEntry undefined for older versions
1 parent f974e9a commit a449533

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/SymbolServer.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ module SymbolServer
33
export SymbolServerInstance, getstore
44

55
using Pkg, SHA
6-
using Pkg.Registry: PkgEntry
76
using Base: UUID, Process
87
import Sockets, UUIDs
98

9+
@static if VERSION >= v"1.7-"
10+
using Pkg.Registry: PkgEntry
11+
end
12+
1013
# this is required to get parsedocs to work on Julia 1.11 and newer, since the implementation
1114
# moved there
1215
using REPL
@@ -38,7 +41,7 @@ const GENERAL_REGISTRY_UUID = UUID("23338594-aafe-5451-b93e-139f81909106")
3841
function get_general_pkgs()
3942
dp_before = copy(Base.DEPOT_PATH)
4043
try
41-
# because the env var JULIA_DEPOT_PATH is overritten this is probably the best
44+
# because the env var JULIA_DEPOT_PATH is overwritten this is probably the best
4245
# guess depot location
4346
push!(empty!(Base.DEPOT_PATH), joinpath(homedir(), ".julia"))
4447
@static if VERSION >= v"1.7-"
@@ -52,7 +55,7 @@ function get_general_pkgs()
5255
reg = Pkg.Types.read_registry(joinpath(r.path, "Registry.toml"))
5356
return reg["packages"]
5457
end
55-
return Dict{UUID, PkgEntry}()
58+
return Dict{String, Any}()
5659
end
5760
finally
5861
append!(empty!(Base.DEPOT_PATH), dp_before)

0 commit comments

Comments
 (0)