JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
821 stars 94 forks source link

[BUG] Unable to use Weave with a Genie server #441

Closed thazhemadam closed 2 years ago

thazhemadam commented 2 years ago

description

I'm trying to run this weave example on a Genie.jl server. However, it seems to block for some reason and not progress at all after a point. I can't even seem to Ctrl+C/Ctrl+D quit the process either. htop tells me that the julia process is still using my system resources though. I also seem to be able to run the weave example normally from a REPL. Could someone help me figure out what's going on here and how I could fix this?

versions

using InteractiveUtils; versioninfo():

Julia Version 1.7.0-beta4
Commit d0c90f37ba (2021-08-24 12:35 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

using Pkg; Pkg.status():

julia> using Pkg; Pkg.status()
[717857b8] DSP v0.7.3
[c43c736e] Genie v3.0.0
[cd3eb016] HTTP v0.9.14
[1dea7af3] OrdinaryDiffEq v5.55.1
[91a5bcdd] Plots v1.22.1
[44d3d7a6] Weave v0.10.10
[9a3f8284] Random
[8dfed614] Test

minimum reproducible steps

  1. Download the Weave example (name it, say, x.jmd)
  2. Create an environment with Genie, Weave and HTTP added as dependencies.
  3. Run -
    
    using Weave
    using Genie, Genie.Router, Genie.Renderer.Json, Genie.Requests
    using HTTP

route("/weave") do weave("x.jmd"; out_path=:pwd) return end

Genie.startup(async = false)


4. Open up your browser and go to `localhost:8080`
5. Keep an eye on the Genie server running, to see the block and non-responsiveness happen in real-time.
thazhemadam commented 2 years ago

I opened this as a separate issue because I didn't know if there were any issues with running Weave on a Genie server. Related #310, #436.

https://github.com/JunoLab/Weave.jl/issues/310#issuecomment-917442717 worked for me.