JuliaPluto / Malt.jl

Simple multiprocessing for Julia
https://juliapluto.github.io/Malt.jl/
MIT License
47 stars 8 forks source link

Allowing `Worker` to spawn a different `julia` #75

Open MichaelHatherly opened 6 months ago

MichaelHatherly commented 6 months ago

Currently Worker doesn't allow for setting the actual julia used, it always uses Base.julia_cmd().

https://github.com/JuliaPluto/Malt.jl/blob/37e4c4a6382f95fd221c0da5d6185a4a1bedd42e/src/Malt.jl#L103-L105

https://github.com/JuliaPluto/Malt.jl/blob/37e4c4a6382f95fd221c0da5d6185a4a1bedd42e/src/Malt.jl#L254-L256

Would exposing that in the Worker constructor be something the maintainers would be happy to support? It appears to be needed to be able to support https://github.com/PumasAI/QuartoNotebookRunner.jl/issues/42, which is something we'd like to add to the quarto runner.


Allowing for different julias does of course then run into the issue of serializing data between different versions not necessarily being deserializable by another julia. So that might warrant a separate issue to discuss being able to pick a different serialization method rather than using Serialization.serialize. I can open one for that if the issue of supporting julia selection for Worker is considered worth pursuing itself.

pankgeorg commented 6 months ago

Sitting next to @fonsp, Fons says great let's do it 😅

(proof: image)

The custom serializer could also be a good idea

MichaelHatherly commented 6 months ago

Thanks, I'll see whether I can get a PR sorted sometime this week.