JuliaPlots / JuliaPlots/PlotlyLight.jl

Error with relocatability

Open
#54 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
112
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Hello,

we have embedded PlotlyLight into a compiled Julia application but it is facing some weird relocatability issues.

```julia
SystemError: opening file "/root/.julia/artifacts/aa67a2d0c294419c5568a236d0fdf8de18af2bd6/templates/plotly_white.json": No such file or directory
Stacktrace:
[1] systemerror(?::String, ?::Int32; ?::Nothing)
@ Base ./:0
[2] open(?::String; ?::Bool, ?::Nothing, ?::Nothing, ?::Nothing, ?::Nothing, ?::Nothing)
@ Base ./:0
[3] open(?::Base.var"#470#471"{Tuple{}}, ?::String; ?::@Kwargs{})
@ Base ./:0
[4] template!(?::String)
@ PlotlyLight ~/.julia/packages/PlotlyLight/DpYsf/src/PlotlyLight.jl:168
[5] _set_plot_defaults
@ /model_build/IARA.jl/src/plots/plots.jl:105 [inlined]
[6] initialize
@ /model_build/IARA.jl/src/IARA.jl:44 [inlined]
[7] main(?::IARA.Args)
@ IARA.InterfaceCalls /model_build/IARA.jl/src/interface_calls/main.jl:23
[8] main
@ /model_build/IARA.jl/src/interface_calls/main.jl:18 [inlined]
[9] julia_interface_call()
@ IARA /model_build/IARA.jl/src/main.jl:59
[10] top-level scope
@ none:1root@3efb74253c79:/IARA#
```
The path `/.root/.julia./...` comes from the machine where the application was compiled.

Although through investigation it seems that everything is relocatable I am afraid that the definition of `plotly::PlotlyArtifacts = PlotlyArtifacts()` in the main file of the module gets compiled at that moment of compilation and gets saved in the system image.

Is it possible to check or modify this in runtime?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at PlotlyLight.jl:168, where template! opens the artifact file, and inspect the PlotlyArtifacts initialization mentioned in the issue. Reproduce the failure in a compiled application relocated from the build machine, then trace _set_plot_defaults in plots.jl:105. Done means the runtime can locate templates without the compiler machine's absolute path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, julia
Domain
build-system, data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.