tweag / jupyenv

Declarative and reproducible Jupyter environments - powered by Nix
https://jupyenv.io/
MIT License
651 stars 135 forks source link

Julia "available" kernel's `default.nix` not reflecting most recent `IJulia` rev #399

Closed harris-chris closed 1 year ago

harris-chris commented 1 year ago

Hello - just to point out that the documentation as it stands doesn't work perfectly for getting a Julia kernel up and running. If you add the IJulia kernel without specifying the version (as suggested in: https://jupyterwith.tweag.io/how-to/#kernels) then it currently defaults to rev 6TIq1, whereas the default in kernels/available/julia/default.nix is ijuliaRev ? "AQu2H". This causes an error when running the notebook via nix run.

djacu commented 1 year ago

Hey thanks for submitting this issue. We stumbled upon this recently as well and it has to do with the version of IJulia that is installed. When the kernel was created, IJulia version 1.23.3 was the latest and that corresponds to AQu2H, but now version 1.24.0 is the latest and that puts it under 6Tiq1. I'm not sure how Julia determines that mini hash.

harris-chris commented 1 year ago

Yes, actually it wasn't obvious to me where that mini-hash comes from either, I've asked on Julia discourse and there's an answer there: https://discourse.julialang.org/t/source-for-the-5-character-hash-in-home-julia-packages-pkgname/92793/3

djacu commented 1 year ago

Nice find!

After looking at the code, I don't think there is a nice way to fix this with the way the kernel is currently setup. Julia is the only stateful kernel we have and there isn't a way to inspect the users folder for which version of IJulia is installed. I've updated the repo so it uses the newer 6TIq1 hash but this is just a bandaid till we can use a reproducible version.

We've looked at using Julia2Nix.jl in the past. Will have to revisit this after a the next update.

djacu commented 1 year ago

Hey @harris-chris

I'm adding the following to the How To page under the "Julia Kernel" section.

image

If there is anything else I can help with, please let me know. Otherwise, feel free to close out the issue.