plotly / Dash.jl

Dash for Julia - A Julia interface to the Dash ecosystem for creating analytic web applications in Julia. No JavaScript required.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PackageCompiler.jl compiled apps showing `Dash*` deprecated dep warnings

etpinard opened this issue · comments

Following up on #157


To reproduce, use:

$ tree
.
├── compile.jl
├── Manifest.toml
├── MyApp
│   ├── Manifest.toml
│   ├── Project.toml
│   └── src
│       └── MyApp.jl
└── Project.toml

$ cat Project.toml
[deps]
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"

$ cat MyApp/Project.toml
name = "MyApp"
uuid = "5bdd58c3-ac14-40ac-9720-559844737c46"
authors = ["your name <info@you.xyz>"]
version = "0.1.0"

[deps]
Dash = "1b08a953-4be3-4667-9a23-3db579824955"

$ cat MyApp/src/MyApp.jl
module MyApp

using Dash

app = dash()

app.layout = html_div() do
    html_button("CLICK", id = "btn"),
    html_div(id = "out")
end

callback!(app,
          Output("out", "children"),
          Input("btn", "n_clicks")) do n_clicks
    return "After click, you have: $n_clicks"
end

function julia_main()::Cint
    try
        run_server(app, "0.0.0.0", 8050)
    catch
        Base.invokelatest(Base.display_error, Base.catch_stack())
        return 1
    end
    return 0
end

end # module

$ cat compile.jl
using PackageCompiler

create_app("MyApp", "MyAppCompiled")

then

$ julia --project compile.jl
PackageCompiler: bundled artifacts:
  ├── Dash
  │   └── dash_resources - 25.242 MiB
  ├── Libiconv_jll - 1.955 MiB
  └── PlotlyBase
      └── plotly-base-artifacts - 2.746 MiB
  Total artifact file size: 29.943 MiB
✔ [03m:43s] PackageCompiler: compiling base system image (incremental=false)
Precompiling project...
  43 dependencies successfully precompiled in 480 seconds
✔ [06m:06s] PackageCompiler: compiling incremental system image
✔ ~/Documents/repos/dash-components/package-compiler-minimal

$ ./MyAppCompiled/bin/MyApp
┌ Warning: The `DashHtmlComponents` package is deprecated. All DashHtmlComponents functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashHtmlComponents ~/.julia/packages/DashHtmlComponents/bHm4X/src/DashHtmlComponents.jl:3
┌ Warning: The `DashCoreComponents` package is deprecated. All DashCoreComponents functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashCoreComponents ~/.julia/packages/DashCoreComponents/Dli7Q/src/DashCoreComponents.jl:3
┌ Warning: The `DashTable` package is deprecated. All DashTable functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashTable ~/.julia/packages/DashTable/dFJHu/src/DashTable.jl:3
[ Info: Listening on: 0.0.0.0:8050