Skip to content

Commit

Permalink
fix: correctly get stdlib docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed May 6, 2024
1 parent eff1741 commit eb9674c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 4 additions & 0 deletions src/SymbolServer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ using Pkg, SHA
using Base: UUID, Process
import Sockets, UUIDs

# this is required to get parsedocs to work on Julia 1.11 and newer, since the implementation
# moved there
using REPL

include("faketypes.jl")
include("symbols.jl")
include("utils.jl")
Expand Down
24 changes: 10 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,21 +184,17 @@ end

@test SymbolServer.stdlibs[:Base][:Sort][:sort] isa SymbolServer.FunctionStore

# FIXME: SymbolServer fails to index Base correctly during precompilation for some reason on 1.11
# I'm removing these tests so we can get a somewhat working release out.
if VERSION < v"1.11-"
@testset "symbol documentation" begin
@test !isempty(SymbolServer.stdlibs[:Base][:abs].doc) # Function
if VERSION >= v"1.7"
@test !isempty(SymbolServer.stdlibs[:Core][:Pair].doc) # DataType
else
@test !isempty(SymbolServer.stdlibs[:Base][:Pair].doc) # DataType
end
@test !isempty(SymbolServer.stdlibs[:Base][:Libc].doc) # Module
@test !isempty(SymbolServer.stdlibs[:Base][:LinRange].doc) # UnionAll
@test !isempty(SymbolServer.stdlibs[:Base][:VecOrMat].doc) # Union
@test occursin("Cint", SymbolServer.stdlibs[:Base][:Cint].doc) # Alias
@testset "symbol documentation" begin
@test !isempty(SymbolServer.stdlibs[:Base][:abs].doc) # Function
if VERSION >= v"1.7"
@test !isempty(SymbolServer.stdlibs[:Core][:Pair].doc) # DataType
else
@test !isempty(SymbolServer.stdlibs[:Base][:Pair].doc) # DataType
end
@test !isempty(SymbolServer.stdlibs[:Base][:Libc].doc) # Module
@test !isempty(SymbolServer.stdlibs[:Base][:LinRange].doc) # UnionAll
@test !isempty(SymbolServer.stdlibs[:Base][:VecOrMat].doc) # Union
@test occursin("Cint", SymbolServer.stdlibs[:Base][:Cint].doc) # Alias
end

if VERSION >= v"1.1-"
Expand Down

0 comments on commit eb9674c

Please sign in to comment.