Errors precompiling Plots with Julia 0.7-alpha.0 on Windows 10 Pro


#1

After Pkg.add("Plots"), using Plots issues the following errors. Will appreciate any advice on how to handle it.

julia> using Plots
[ Info: Precompiling module Plots
┌ Warning: `replace(s::AbstractString, pat, f)` is deprecated, use `replace(s, pat => f)` instead.
│   caller = _parse_colorant(::String) at parse.jl:51
└ @ Colors parse.jl:51
┌ Warning: Deprecated syntax `parametric method syntax get_color_palette{C <: Colorant}(palette::Vector{C}, bgcolor::Colorant, numcolors::Integer)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_utils.jl:73.
│ Use `get_color_palette(palette::Vector{C}, bgcolor::Colorant, numcolors::Integer) where C <: Colorant` instead.
└ @ nothing color_utils.jl:73
WARNING: importing deprecated binding Base.@sprintf into PlotUtils.
WARNING: Base.@sprintf is deprecated: it has been moved to the standard library package `Printf`.
Add `using Printf` to your imports.
  likely near C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_utils.jl:151
WARNING: Base.@sprintf is deprecated: it has been moved to the standard library package `Printf`.
Add `using Printf` to your imports.
  likely near C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_utils.jl:155
┌ Warning: Deprecated syntax `type` at C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_gradients.jl:2.
│ Use `mutable struct` instead.
└ @ nothing color_gradients.jl:2
┌ Warning: Deprecated syntax `immutable` at C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_gradients.jl:106.
│ Use `struct` instead.
└ @ nothing color_gradients.jl:106
┌ Warning: Deprecated syntax `parametric method syntax register_gradient_colors{C <: Colorant}(name::Symbol, colors::AbstractVector{C}, color_library::Symbol = :default)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_gradients.jl:47.
│ Use `register_gradient_colors(name::Symbol, colors::AbstractVector{C}, color_library::Symbol = :default) where C <: Colorant` instead.
└ @ nothing color_gradients.jl:47
WARNING: importing deprecated binding Base.Void into PlotUtils.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\user\.julia\packages\PlotUtils\YjED\src\color_gradients.jl:176
┌ Warning: `linspace(start, stop, length::Integer)` is deprecated, use `range(start, stop=stop, length=length)` instead.
│   caller = sample_evenly(::Array{ColorTypes.RGB{Float64},1}, ::Int64) at color_gradients.jl:241
└ @ PlotUtils color_gradients.jl:241
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\user\.julia\packages\PlotUtils\YjED\src\colors.jl:8
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\user\.julia\packages\PlotUtils\YjED\src\colors.jl:15
┌ Warning: Deprecated syntax `parametric method syntax plot_color{T <: Number}(zs::AbstractArray{T})` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\colors.jl:50.
│ Use `plot_color(zs::AbstractArray{T}) where T <: Number` instead.
└ @ nothing colors.jl:50
┌ Warning: Deprecated syntax `parametric method syntax plot_color{T <: Number}(zs::AbstractArray{T}, α::Number)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\colors.jl:64.
│ Use `plot_color(zs::AbstractArray{T}, α::Number) where T <: Number` instead.
└ @ nothing colors.jl:64
┌ Warning: Deprecated syntax `parametric method syntax bounding_order_of_magnitude{DT}(xspan::DT)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\ticks.jl:8.
│ Use `bounding_order_of_magnitude(xspan::DT) where DT` instead.
└ @ nothing ticks.jl:8
┌ Warning: Deprecated syntax `parametric method syntax optimize_ticks{T}(x_min::T, x_max::T; extend_ticks::Bool = false, Q = [(1.0, 1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)], k_min::Int = 2, k_max::Int = 10, k_ideal::Int = 5, granularity_weight::Float64 = (1 / 4), simplicity_weight::Float64 = (1 / 6), coverage_weight::Float64 = (1 / 3), niceness_weight::Float64 = (1 / 4), strict_span = true, span_buffer = nothing)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\ticks.jl:63.
│ Use `optimize_ticks(x_min::T, x_max::T; extend_ticks::Bool = false, Q = [(1.0, 1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)], k_min::Int = 2, k_max::Int = 10, k_ideal::Int = 5, granularity_weight::Float64 = (1 / 4), simplicity_weight::Float64 = (1 / 6), coverage_weight::Float64 = (1 / 3), niceness_weight::Float64 = (1 / 4), strict_span = true, span_buffer = nothing) where T` instead.
└ @ nothing ticks.jl:63
┌ Warning: Deprecated syntax `parametric method syntax optimize_ticks_typed{T}(x_min::T, x_max::T, extend_ticks, Q::Vector{Tuple{Float64, Float64}}, k_min, k_max, k_ideal, granularity_weight::Float64, simplicity_weight::Float64, coverage_weight::Float64, niceness_weight::Float64, strict_span, span_buffer)` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\ticks.jl:75.
│ Use `optimize_ticks_typed(x_min::T, x_max::T, extend_ticks, Q::Vector{Tuple{Float64, Float64}}, k_min, k_max, k_ideal, granularity_weight::Float64, simplicity_weight::Float64, coverage_weight::Float64, niceness_weight::Float64, strict_span, span_buffer) where T` instead.
└ @ nothing ticks.jl:75
┌ Warning: Deprecated syntax ``const` declaration on local variable` around C:\Users\user\.julia\packages\PlotUtils\YjED\src\ticks.jl:81.
└ @ nothing ticks.jl:81
ERROR: LoadError: LoadError: UndefVarError: Date not defined
Stacktrace:
 [1] top-level scope
 [2] include at .\boot.jl:314 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1071
 [4] include(::Module, ::String) at .\sysimg.jl:29
 [5] include(::String) at C:\Users\user\.julia\packages\PlotUtils\YjED\src\PlotUtils.jl:4
 [6] top-level scope
 [7] include at .\boot.jl:314 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1071
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope
 [11] eval at .\boot.jl:316 [inlined]
 [12] eval(::Expr) at .\client.jl:394
 [13] macro expansion at .\none:3 [inlined]
 [14] top-level scope at .\<missing>:0
in expression starting at C:\Users\user\.julia\packages\PlotUtils\YjED\src\ticks.jl:190
in expression starting at C:\Users\user\.julia\packages\PlotUtils\YjED\src\PlotUtils.jl:35
ERROR: LoadError: Failed to precompile PlotUtils to C:\Users\user\.julia\compiled\v0.7\PlotUtils\YveH.ji.
Stacktrace:
 [1] error at .\error.jl:33 [inlined]
 [2] compilecache(::Base.PkgId) at .\loading.jl:1207
 [3] _require(::Base.PkgId) at .\loading.jl:978
 [4] require(::Base.PkgId) at .\loading.jl:878
 [5] require(::Module, ::Symbol) at .\loading.jl:873
 [6] include at .\boot.jl:314 [inlined]
 [7] include_relative(::Module, ::String) at .\loading.jl:1071
 [8] include(::Module, ::String) at .\sysimg.jl:29
 [9] top-level scope
 [10] eval at .\boot.jl:316 [inlined]
 [11] eval(::Expr) at .\client.jl:394
 [12] macro expansion at .\none:3 [inlined]
 [13] top-level scope at .\<missing>:0
in expression starting at C:\Users\user\.julia\packages\Plots\RGIT\src\Plots.jl:13
ERROR: Failed to precompile Plots to C:\Users\user\.julia\compiled\v0.7\Plots\ld3v.ji.
Stacktrace:
 [1] error at .\error.jl:33 [inlined]
 [2] compilecache(::Base.PkgId) at .\loading.jl:1207
 [3] _require(::Base.PkgId) at .\loading.jl:1007
 [4] require(::Base.PkgId) at .\loading.jl:878
 [5] require(::Module, ::Symbol) at .\loading.jl:873
julia> versioninfo()
Julia Version 0.7.0-alpha.0
Commit 22590d529d* (2018-05-31 00:07 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, sandybridge)

#2

Did you resolve this? I’m getting the same error, and checking out branch julia0.7 should supposedly solve this issue, but does not for me.


#3

I managed to fix it

(v0.7) pkg> dev PlotsUtils
bash$ git checkout julia0.7
(v0.7) pkg> resolve
julia> using PlotUtils

For some reason, the suggested strategy of checking out branch julia0.7 from pkg dev did not check out the correct branch.
(v0.7) pkg> dev PlotsUtils#julia0.7


#4

Yes, it is a bug that is now fixed, https://github.com/JuliaLang/Pkg.jl/issues/406. Not yet in Julia nightly though.


#5

Compiling Plots still fails further down the line though


#6

I have tried to use Plots in julia0.7-rc2, but still get errors as follows:

julia> Pkg.add("Plots")
 Resolving package versions...
  Updating `C:\Users\user\.julia\environments\v0.7\Project.toml`
 [no changes]
  Updating `C:\Users\user\.julia\environments\v0.7\Manifest.toml`
 [no changes]

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
┌ Warning: __precompile__() is now the default
│   caller = top-level scope at none:0
└ @ Core none:0
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: Deprecated syntax `call to `&` inside call to bitshift operator` at C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:170.
│ Use `parenthesized call to `&`` instead.
└ @ C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:170
┌ Warning: Deprecated syntax `call to `&` inside call to bitshift operator` at C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:170.
│ Use `parenthesized call to `&`` instead.
└ @ C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:170
┌ Warning: Deprecated syntax `call to `&` inside call to bitshift operator` at C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:171.
│ Use `parenthesized call to `&`` instead.
└ @ C:\Users\user\.julia\packages\Colors\RvyvG\src\conversions.jl:171
┌ Warning: __precompile__() is now the default
│   caller = top-level scope at none:0
└ @ Core none:0
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = top-level scope at none:0
└ @ Core none:0
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
WARNING: importing deprecated binding Base.Display into Plots.
WARNING: Base.Display is deprecated, use AbstractDisplay instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\types.jl:9
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:310.
└ @ C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:310
WARNING: importing deprecated binding Base.Void into Plots.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:262
WARNING: importing deprecated binding Base.e into Plots.
WARNING: Base.e is deprecated, use ℯ (\euler) or `Base.MathConstants.e`
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:355
WARNING: importing deprecated binding Base.Range into Plots.
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:453
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:454
WARNING: importing deprecated binding Base.@printf into Plots.
WARNING: Base.@printf is deprecated: it has been moved to the standard library package `Printf`.
Add `using Printf` to your imports.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:823
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:849
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:850
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\user\.julia\packages\Plots\V3tQq\src\utils.jl:859
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:72.
└ @ C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:72
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:391.
└ @ C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:391
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:423.
└ @ C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:423
┌ Warning: Deprecated syntax `"begin" inside indexing expression` at C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:491.
└ @ C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:491
┌ Warning: `linspace(start, stop, length::Integer)` is deprecated, use `range(start, stop=stop, length=length)` instead.
│   caller = partialcircle(::Float64, ::Float64, ::Int64, ::Float64) at components.jl:61
└ @ Plots C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:61
┌ Warning: `shift!` is deprecated, use `popfirst!` instead.
│   caller = #weave#85(::Array{Array{T,1} where T,1}, ::Function, ::Array{Tuple{Float64,Float64},1}, ::Array{Tuple{Float64,Float64},1}) at components.jl:71
└ @ Plots C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:71
WARNING: importing deprecated binding Base.Nullable into Plots.
ERROR: LoadError: LoadError: TypeError: in SeriesAnnotations, in type definition, expected Type, got typeof(Base.Nullable)
Stacktrace:
 [1] top-level scope at none:0
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\user\.julia\packages\Plots\V3tQq\src\Plots.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:399
 [13] top-level scope at .\none:3
in expression starting at C:\Users\user\.julia\packages\Plots\V3tQq\src\components.jl:438
in expression starting at C:\Users\user\.julia\packages\Plots\V3tQq\src\Plots.jl:157
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\Users\user\.julia\compiled\v0.7\Plots\ld3vC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1185
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:852
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:834

julia>

julia> versioninfo()
Julia Version 0.7.0-rc2.0
Commit 78540cba4c (2018-08-02 19:14 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, sandybridge)

#7

To use Plots on v0.7 you currently need the untagged master branch, so dev Plots in the package manager. This is presumably because the testing infrastructure is not yet ready for v0.7.


#8

I’m having the same issue on MacOS.