Wedg / PlotShapefiles.jl

A package to plot shapefiles with Julia.
MIT License
12 stars 3 forks source link

Precompilation error #4

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi

I cannot call the library. I am using Julia v1.3.1

image

sylvaticus commented 4 years ago

I have the same problem (but I suggest to rename the issue in "Precompilation error"):

julia> using PlotShapefiles
[ Info: Precompiling PlotShapefiles [297584a0-97f5-11e9-2762-9b6638c511aa]
ERROR: LoadError: LoadError: TypeError: in Type{...} expression, expected UnionAll, got Type{Shapefile.Rect}
Stacktrace:
 [1] top-level scope at /home/lobianco/.julia/packages/PlotShapefiles/QGAd2/src/utils.jl:22
 [2] include at ./boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1105
 [4] include at ./Base.jl:31 [inlined]
 [5] include(::String) at /home/lobianco/.julia/packages/PlotShapefiles/QGAd2/src/PlotShapefiles.jl:1
 [6] top-level scope at /home/lobianco/.julia/packages/PlotShapefiles/QGAd2/src/PlotShapefiles.jl:44
 [7] include at ./boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at ./loading.jl:1105
 [9] include(::Module, ::String) at ./Base.jl:31
 [10] top-level scope at none:2
 [11] eval at ./boot.jl:330 [inlined]
 [12] eval(::Expr) at ./client.jl:425
 [13] top-level scope at ./none:3
in expression starting at /home/lobianco/.julia/packages/PlotShapefiles/QGAd2/src/utils.jl:22
in expression starting at /home/lobianco/.julia/packages/PlotShapefiles/QGAd2/src/PlotShapefiles.jl:44
ERROR: Failed to precompile PlotShapefiles [297584a0-97f5-11e9-2762-9b6638c511aa] to /home/lobianco/.julia/compiled/v1.3/PlotShapefiles/6gEgv_hEBiJ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
sylvaticus commented 4 years ago

Note that removing the signature in the function(s) parameter MBR::Shapefile.Rect{Float64} it now compiles and I can get the tutorial running in Julia 1.3.1, but I guess there is a more idiomatic way to solve this problem.