gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
231 stars 21 forks source link

Julia-snail fails to create vterm process #95

Closed wtleeiv closed 2 years ago

wtleeiv commented 2 years ago

Hi there! First off, thanks for such a cool package, I'm really excited to start using it. However, when I try to start a repl process with julia-snail, an error message pops up really fast and then disappears, and I cannot seem to start a repl. I am able to use vterm just fine on its own. Any help you can provide would be much appreciated :)

Here's a screenshot of the output: Screenshot 2022-05-14 09 00 06

gcv commented 2 years ago

With version 1.6, the Julia project changed the Manifest.toml file format. I "upgraded" Snail to use it, and thought it would be backwards compatible. I should have known better, or at least should have tested it.

Do you have access to Julia version 1.6 or later? It should then work.

Meanwhile, I need to think about how to fix this. I want Snail to work with older versions of Julia.

@dahtah, @MasonProtter, @orialb — opinions? One possibility is to stop committing Manifest.toml, but that (1) messes with reproducibility, and (2) messes with downstream distribution packages which might want to include julia-snail because suddenly the Manifest.toml file needs to get written in a read-only directory somewhere. Another possibility is to hijack the Julia Pkg mechanism for resolving these files and force it to load different Manifest.toml files, but that's another headache because it requires maintaining different ones. Yet a third possibility is to roll back to the older manifest format in general, but that prints an annoying warning on newer versions of Julia.

MasonProtter commented 2 years ago

You should not be committing the Manifest. Packages are encouraged to only send out a manifest if they actually NEED that exact set of package versions to work correctly (like some bleeding edge unstable packages).

When you provide a manifest, you limit what package versions can be loaded at a given time which can often cause problems where the package manager can’t find a set of compatible versions for an environment, or a package gets stuck on a very old version.

Instead, you should just provide the Project.toml and then a Manifest.toml will be locally generated automatically inside the directory once it gets instantiated, and if the user needs to reproduce the environment they’re using, then they just send that file.

MasonProtter commented 2 years ago

Unfortunately, this has not really been made clear anywhere official. Maybe it’s time for a docs PR. Here’s what some core devs have to say about the patter though: https://discourse.julialang.org/t/does-manifest-toml-belong-in-the-repository/12029

wtleeiv commented 2 years ago

Thanks for the feedback! I'll try to track down a newer version of Julia (I just checked and I'm on 1.5.3). Cheers!

wtleeiv commented 2 years ago

I just updated to 1.7.2 but julia-snail still fails. This time, there is no visible error message like I posted earlier, just the message: julia-snail--repl-enable: The vterm buffer is inactive; double-check julia-snail-executable path

gcv commented 2 years ago

From your regular terminal, run /path/to/julia -L /path/to/julia-snail/JuliaSnail.jl. That should make the error more visible. Please paste it here.

wtleeiv commented 2 years ago

I fixed it. Turns out I've gone this whole time without needing to install exec-path-from-shell. Emacs simply couldn't find the updated version of Julia I installed into a non-system directory. Sorry for the re-open, but thanks a bunch for your help! :) Happy hacking!

gcv commented 2 years ago

Glad to help.

@MasonProtter: Thanks. That makes sense. I'll try removing Manifest.toml and see if anything catches fire.