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