etpinard / dash-textarea-autocomplete

Dash component wrapper for `react-textarea-autocomplete`
MIT License
13 stars 1 forks source link

Recap of `PackageCompiler.jl` push #26

Open etpinard opened 2 years ago

etpinard commented 2 years ago

Writing down some info and thoughts that might useful to other Dash component developers that want to support Julia


Release v1.3.1 is the first release which made DashTextareaAutocomplete functional in PackageCompiler compiled apps.

We did so by adding a Artifact.toml to this project (more info on Julia Artifacts here). Julia artifacts only support publicly-available URLs of tarballs as targets, so we tar'ed the min.js and min.js.map files in deps/ in an extra build sub-command. After npm publish, this tarball is then available on unpkg.com e.g. at https://unpkg.com/dash-textarea-autocomplete@1.3.1/deps/deps.tar.gz

In postbuild_fixups.sh, we:

  1. include the Pkg.Artifacts module in src/DashTextareaAutocomplete.jl and addPkg in the Project.toml deps
  2. use the artifact"" string macro to include the tarball content in src/DashTextareaAutocomplete.jl upon initialisation (see https://github.com/etpinard/dash-textarea-autocomplete/pull/21)
  3. update the Artifact.toml specifications accordingly

(along with patching for https://github.com/etpinard/dash-textarea-autocomplete/issues/11)

PR https://github.com/etpinard/dash-textarea-autocomplete/pull/25 may eventually streamline this process a little bit more and perhaps make it more robust as well.

Drawbacks

waralex commented 2 years ago

Hi, @etpinard , @Felix-Gauthier ! I have been working on a new system for generating/publishing component packages for Julia from Python packages for quite some time. Unfortunately, the work is not going very fast - because my main job takes up a lot of time and working on the current issues of Dash.jl also distracts from this task. If you have the time and desire - could you check how your package will be generated and whether it will work with PackageCompiler out of the box? The development version of components generator is here: https://github.com/waralex/DashComponentsBuilder.jl For more operational communication, you can write to Julia's slack in the #dash channel, or directly to me there (my nickname is waralex)