Skip to content
Open
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
27 changes: 21 additions & 6 deletions src/DocumentationGenerator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,27 @@ end

function try_use_package(packagespec)
pkg_sym = Symbol(packagespec.name)

pkg_module = try
@eval(Main, (using $pkg_sym; $pkg_sym))
catch err
@error("`using $(pkg_sym) did not succeed.`", exception=err)
nothing
local pkg_module

p, _ = run_with_timeout(```
$(Base.julia_cmd())
--project="$(Pkg.project().path)"
--color=no
--compiled-modules=no
-O0
-e "using $pkg_sym; exit(99)"
```; name="loading package $pkg_sym")
wait(p)
if p.exitcode == 99
pkg_module = try
@eval(Main, (using $pkg_sym; $pkg_sym))
catch err
@error("`using $(pkg_sym) did not succeed.`", exception=err)
nothing
end
else
@error("`using $(pkg_sym) did not succeed.`")
return nothing
end

return pkg_module
Expand Down
22 changes: 22 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,28 @@ end
success = [true],
doctype = ["documenter"],
using_failed = [false]
),
# loads, runs a game, then calls `exit()`:
(
name = "Tetris",
uuid = "d02b474b-c6a0-45b1-beee-9a2049fa00e6",
url = "https://github.com/mossr/Tetris.jl/",
versions = [v"1.0.0"],
installs = [true],
success = [true],
doctype = ["fallback_autodocs"],
using_failded = [true]
),
# segfaults:
(
name = "Glibc_jll",
uuid = "452aa2e7-e185-58db-8ff9-d3c1fa4bc997",
url = "https://github.com/JuliaBinaryWrappers/Glibc_jll.jl",
versions = [v"2.29.0+0"],
installs = [true],
success = [true],
doctype = ["fallback_autodocs"],
using_failded = [true]
)
]

Expand Down