Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/Issue79Pkg/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = "Issue79Pkg"
uuid = "fa155e15-ec49-4eec-b540-f513de9043b2"
authors = ["ExplicitImports tests"]
version = "0.1.0"

[weakdeps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[extensions]
LinearAlgebraExt = "LinearAlgebra"
6 changes: 6 additions & 0 deletions test/Issue79Pkg/ext/LinearAlgebraExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module LinearAlgebraExt

include("SubmoduleExt.jl")
using .SubmoduleExt

end # module LinearAlgebraExt
7 changes: 7 additions & 0 deletions test/Issue79Pkg/ext/SubmoduleExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module SubmoduleExt

export LOCAL_CONST

const LOCAL_CONST = 1

end # module SubmoduleExt
3 changes: 3 additions & 0 deletions test/Issue79Pkg/src/Issue79Pkg.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Issue79Pkg

end # module Issue79Pkg
10 changes: 10 additions & 0 deletions test/issue_79_test.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Issue79Pkg
using LinearAlgebra

ext_mod = Base.get_extension(Issue79Pkg, :LinearAlgebraExt)

@testset "extension submodule analyzable (#79)" begin
@test ext_mod !== nothing
@test isdefined(ext_mod, :SubmoduleExt)
@test check_no_implicit_imports(Issue79Pkg) === nothing
end
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Pkg
Pkg.develop(; path=joinpath(@__DIR__, "TestPkg"))
Pkg.develop(; path=joinpath(@__DIR__, "Issue79Pkg"))
Pkg.precompile()
using ExplicitImports
using ExplicitImports: analyze_all_names, has_ancestor, should_skip,
Expand Down Expand Up @@ -105,6 +106,10 @@ include("issue_140.jl")
(; name=:groupby, source=DataFrames.DataAPI)]
end

@testset "Extension submodules (#79)" begin
include("issue_79_test.jl")
end

@testset "Field names shadowing external globals (#111)" begin
include("issue_111_test.jl")
end
Expand Down
Loading