JuliaPlots / RecipesPipeline.jl

Utilities for processing recipes
http://juliaplots.org/RecipesPipeline.jl/dev/
MIT License
17 stars 17 forks source link

Bug: v0.3.6 breaks `seriestype` attribute #100

Closed hdavid16 closed 3 years ago

hdavid16 commented 3 years ago

Step plots cannot be made with the most recent release.

For example:

using Plots
plot!(1:10,seriestype=:steppost)
ERROR: MethodError: no method matching Val{:steppost}(::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char)
Stacktrace:
 [1] apply_recipe(plotattributes::Dict{Symbol, Any}, #unused#::Type{Val{:steppost}}, plt::Plots.Plot{Plots.GRBackend})
   @ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\recipes.jl:50
 [2] _process_plotrecipe(plt::Any, kw::Any, kw_list::Any, still_to_process::Any)
   @ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\plot_recipe.jl:32
 [3] _process_plotrecipes!(plt::Any, kw_list::Any)
   @ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\plot_recipe.jl:18
 [4] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
   @ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\RecipesPipeline.jl:81
 [5] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
   @ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:207
 [6] plot!(plt::Plots.Plot, args::Any; kw::Any)
   @ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:197
 [7] plot!(args::Any; kw::Any)
   @ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:187
 [8] top-level scope
   @ REPL[9]:1

However, the step plot works if I downgrade to v0.3.5.

BeastyBlacksmith commented 3 years ago

@BioTurboNick @t-bltg

t-bltg commented 3 years ago

@hdavid16, are you on Plots 1.21.1 ?

RecipesPipeline@0.3.6 will only work with Plots ≥ 1.21.1.

BioTurboNick commented 3 years ago

Nevermind, didn't realize 0.3.6 implemented removal of the exception checking. This issue is why I was wondering about needing to wait until a v0.4 to avoid Plots < 1.21.1 loading it.

BeastyBlacksmith commented 3 years ago

apart from this should definitively have been released in 0.4. he said on slack that he is on 1.21.1

t-bltg commented 3 years ago

@ Plots C:\Users\HD.julia\packages\Plots\avj9X\src\plot.jl:187

avj9X doesn't look like 1.21.1, does it ?

hdavid16 commented 3 years ago

Hi guys, yes, I'm on 1.21.1.

BioTurboNick commented 3 years ago

@hdavid16 I think the confusion is that the error message has "avj9X" in the path, while "WBKlv" is associated with v1.21.1.

What does ]st show?

hdavid16 commented 3 years ago
(@v1.6) pkg> st Plots
      Status `C:\Users\HD\.julia\environments\v1.6\Project.toml`
  [91a5bcdd] Plots v1.21.1
hdavid16 commented 3 years ago

I do see WBKIv in the Plots package folder. I don't know why the error says avj9X.

image

BioTurboNick commented 3 years ago

What does the Project.toml file in the avj9X folder say for the version?

t-bltg commented 3 years ago

Please run

import Pkg, Dates
Pkg.gc(collect_delay=Dates.Day(0))

to cleanup old releases.

And maybe using Pkg; Pkg.instantiate().

hdavid16 commented 3 years ago

avj9x says version = "1.19.4"

Ok. I'll run the cleaning upgrade to v0.3.6 and see if I can make the step plot.

BioTurboNick commented 3 years ago

@t-bltg as an aside, perhaps a 0.3.7 should be released with the reversion of the PR that led to this issue?

t-bltg commented 3 years ago

Ok. I'll run the cleaning upgrade to v0.3.6 and see if I can make the step plot.

using Plots
plot!(1:10,seriestype=:steppost)

does run on my machine without any issues with RecipesPipeline@0.3.6 and Plots@1.21.1.

t-bltg commented 3 years ago

@t-bltg as an aside, perhaps a 0.3.7 should be released with the reversion of the PR that led to this issue?

I don't think this is needed since if the users do using Pkg; Pkg.up(), everything should run fine.

hdavid16 commented 3 years ago

Please run

import Pkg, Dates
Pkg.gc(collect_delay=Dates.Day(0))

to cleanup old releases.

I get this warning (and a bunch of other ones for other packages):

┌ Warning: Failed to delete C:\Users\HD\.julia\packages\Plots\Ih71u
│   exception = IOError: chmod("C:\\Users\\HD\\.julia\\packages\\Plots\\Ih71u\\.gitignore", 0o777): invalid argument (EINVAL)
└ @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:803

I'll confirm it works once that finishes running and I upgrade RecipesPipeline.

Thanks, guys

hdavid16 commented 3 years ago

So, I'm curious, why did this happen? Is Julia pointing to the wrong package even if ]st Plots says 1.21.1 ?

t-bltg commented 3 years ago

So, I'm curious, why did this happen?

Me too. Maybe an interrupted update ?

hdavid16 commented 3 years ago

Perhaps, don't recall that happening. Also, why doesn't ]up <package name> clean old versions from the .julia/packages/ directory? The cleaning you suggested removed like 8GB of junk in my .julia directory.

BioTurboNick commented 3 years ago

@t-bltg as an aside, perhaps a 0.3.7 should be released with the reversion of the PR that led to this issue?

I don't think this is needed since if the users do using Pkg; Pkg.up(), everything should run fine.

Unless they need Plots to be pinned < 1.21.1 for some reason. It's a breaking change to RecipesPipeline, so following semantic versioning should guarantee that Plots 1.10.4 (where compat was first set to RecipesPipeline 0.3) through 1.21.0 should work with all (or at least the latest) RecipesPipeline in 0.3.x.

t-bltg commented 3 years ago

Also, why doesn't ]up clean old versions

Because Pkg allows to use different packages version when using --project https://pkgdocs.julialang.org/v1/api/#Pkg.activate.

But if you use a single environment, then use can use Pkg.up(); Pkg.gc(...) every time you want to update your packages. That's what I use daily ...

t-bltg commented 3 years ago

Unless they need Plots to be pinned < 1.21.1 for some reason. It's a breaking change to RecipesPipeline, so following semantic versioning should guarantee that Plots 1.10.4 (where compat was first set to RecipesPipeline 0.3) through 1.21.0 should work with all (or at least the latest) RecipesPipeline in 0.3.x.

Should we then release 0.3.7 with try/catch and 0.4.0 without then ?