PlotlyJS.jl icon indicating copy to clipboard operation
PlotlyJS.jl copied to clipboard

PlotlyJS fails to precompile on Julia 1.10.x

Open ninjit opened this issue 10 months ago • 2 comments

Can't add/use PlotlyJS on Julia 1.10.x, because WebIO, Blink, and JSExpr fail to precompile.

Julia Version details:

julia> versioninfo()
Julia Version 1.10.9
Commit 5595d20a287 (2025-03-10 12:51 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)
Environment:
  JULIA_NUM_THREADS = auto

Status of bare environment trying to add PlotlyJS:

(Plotly) pkg> st
Status `~/Work/Coding/Julia/Plotly/Project.toml`
  [f0f68f2c] PlotlyJS v0.18.16

The precompilation error I see:

✗ WebIO
  ✗ JSExpr
  ✗ Blink
  ✗ PlotlyJS
Precompiling packages finished.
  0 dependencies successfully precompiled in 7 seconds. 58 already precompiled.
  4 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

Looking through the julia discourse, it seems the problems with WebIO Blink etc. may not be fixed. So is there a workaround to keep using Plotly as a backend to Plots?

ninjit avatar Apr 23 '25 21:04 ninjit

I remember solving it with ]build PlotlyJS (or maybe it was one of the dependencies).

mzaffalon avatar Apr 24 '25 09:04 mzaffalon

Thank you for the hint! I couldn't get it to work with build, but you led me down the right direction.

I was able to install WebIO, Blink and JSExpr first with some warnings about BinaryProvider, but otherwise precompiled successfully. Then installing PlotlyJS afterwards gave me a working setup!

I'm not sure what this implies in terms of the dependency errors: Perhaps the required versions need to be incremented?

ninjit avatar Apr 25 '25 23:04 ninjit