Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotly.js version is stuck at 1.58.5 rather than 2.2.1 #394

Closed
thchr opened this issue Jul 21, 2021 · 4 comments
Closed

plotly.js version is stuck at 1.58.5 rather than 2.2.1 #394

thchr opened this issue Jul 21, 2021 · 4 comments

Comments

@thchr
Copy link
Contributor

thchr commented Jul 21, 2021

My impression from 256f8f3 commit message was that PlotlyJS.jl would now be using plotly.js v2.21 - but it seems it is in fact still using v1.58.5. Specifically, looking at these two lines in /src/PlotlyJS.jl and testing them out (from the PlotlyJS.jl package directory), we see that:

using Pkg.Artifacts
_js_path = joinpath(artifact"plotly-artifacts", "plotly.min.js")
println.(readlines(_js_path )[1:2]);

gives

/**
* plotly.js v1.58.5

and similarly so for

using HTTP
_js_cdn_path = "https://cdn.plot.ly/plotly-latest.min.js"
println.(readlines(HTTP.download(_js_cdn_path))[1:2])

Of course, this is all on v0.18.0:

(@v1.6) pkg> st PlotlyJS
      Status `C:\Users\tchr\.julia\environments\v1.6\Project.toml`
  [f0f68f2c] PlotlyJS v0.18.0 `C:\Users\tchr\.julia\dev\PlotlyJS`

So, as a practical matter, my PlotlyJS.jl still seems to be using v1.58.5 rather than 2.2.1. I'm not sure if that's because I'm somehow stuck on an old artifact (I checked that the new artifact url definitely points to v2.2.1)? If so, I thought it would've automatically updated.
On the other hand, it doesn't seem right that _js_cdn_path still points to v1.58.5?

I stumbled upon this because I was hoping that the new version would include this fix from plotly.js plotly/plotly.js#4140.

@jkrimmer
Copy link
Contributor

Have you already tried reinstalling PlotlyJS? I noticed that you added PlotlyJS as a development package, maybe the installed artifact has not been updated correctly. On my machine, this issue does not occur for the plot shown in the Blink window. Setting up an icicle plot (which to the best of my knowledge has only been introduced with v2), we can verify that the plot in the Blink window uses the recent release:

julia> D = Dict(:type=>"icicle",
           :labels=>["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
           :parents=>["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
           :values=>[10, 14, 12, 10, 2, 6, 6, 4, 4])
julia> plot(GenericTrace("icicle",D))

However, you brought two issues to my attention:

  1. Is this variable _js_cdn_path in PlotlyJS.jl still needed?
  2. PlotlyBase still defines const PLOTLYJS_VERSION = "1.58.4", so we should find a way to synchronize the versions used in PlotlyJS and PlotlyBase. Consequently, exported HTML-files still use v1.58.4.

@thchr
Copy link
Contributor Author

thchr commented Jul 22, 2021

Argh, you are right: somehow the artifact was stuck...
(I had done several rm->add->up shuffles without success before reporting this - ending up settling up reporting from a deved version - which hadn't worked. Just trying that shuffle again this morning, following your advice, seemed to do it though - although I don't understand why. My dev'ed version is somehow still stuck though - I don't know how to force it to update its artifact?)

Any idea of why an artifact could get stuck like this? I thought they were content-addressed?

I'm glad there were some issues related to this that weren't just a stuck artifact. Point 2 would be especially nice to fix.

@sglyon
Copy link
Member

sglyon commented Jul 30, 2021

fixed!

we are up to 2.3.0 now 🎉

@sglyon sglyon closed this as completed Jul 30, 2021
@jkrimmer
Copy link
Contributor

@thchr : Unfortunately, I do not know how to force update the artifact associated with the dev'ed package. (I do not have a lot of experience in the handling of artifacts). Anyway, I am glad that I was able to help. And sorry for replying late!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants