Skip to content

Commit

Permalink
Merge pull request #63 from mirkobunse/master
Browse files Browse the repository at this point in the history
Trying to fix the tests at RegistryCI
  • Loading branch information
MaximeBouton authored Aug 29, 2020
2 parents 2d37a11 + a2b1923 commit 34dfc43
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/svg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ function __init__svg()
if Sys.which("pdf2svg") != nothing
svgBackend(PdfToSvgBackend())
else
svgBackend(PopplerBackend())
try
svgBackend(PopplerBackend())
catch cause
@warn "Failed to load PopplerBackend; falling back on DVIBackend" cause
svgBackend(DVIBackend())
end
end

# define a new implementation for PopplerBackend, but only after `import Poppler_jll`
Expand Down Expand Up @@ -54,12 +59,14 @@ end
# backend initialization
_initialize(backend::SVGBackend) = nothing # default
_initialize(backend::PopplerBackend) =
try
@eval Main begin
import Poppler_jll # will trigger @require in __init__svg
if !Requires.isprecompiling()
@eval TikzPictures begin
try
import Poppler_jll # will trigger @require in __init__svg
catch
error("Unable to import Poppler_jll") # should not happen as long as Poppler_jll is a dependency
end
end
catch
error("Unable to initialize $backend") # should not happen as long as Poppler_jll is a dependency
end

# compile a temporary PDF file that can be converted to SVG
Expand Down

2 comments on commit 34dfc43

@MaximeBouton
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/20417

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v3.3.0 -m "<description of version>" 34dfc43aaa7f1a983af8ea23cd4996f4dc958dcf
git push origin v3.3.0

Please sign in to comment.