-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clj Jack-in on Windows uses legacy power shell #1000
Comments
With this I'd want to verify what powershell version (powershell.exe or pwsh.exe) works with clj-on-windows as well as clojure installed via Chocolatey or scoop. I suppose this might be worth looking into for lein too. I'm not sure which one would work in the majority of situations at this point, but if we must default to one, I think it should be the one that works in most cases. Also, if there's any way we can figure out which one should be used, then we should do that, but there may not be a simple solution to this. |
Also, clojure-lsp was recently changed to use |
Yeah, we would need to know when to use pwsh or powershell.exe, it seems emacs lsp-mode checks for one then fallback to other: https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-pwsh.el#L228 |
Interesting, I think though from the quoted comment in this issue that it's not enough to check which exists. From what that person said, it seems you can have both, but it depends on how Clojure was installed as to which one will be able to see/run it. |
It is quite a mess. 😄 I'm trying a different path in a local dev branch right now. Bundling and using babashka to launch the repl. It works, and I'll push the branch so that more people can try it, but I'm not sure it is the way to go. Partly because it is quite a huge bundle, adding 70mb to Calva's current 35mb. Not sure if we should care much about that. Yeah, generally, ”not sure” sums up a lot of where I am right now... However, babashka uses Then, also, clojure-lsp should be able to consume |
If clojure-lsp can use |
Yeah, it looks a alternative way indeed, not sure how hard is to implement that, we would need to parse a deps file and get all classpath, not sure there is any way to do that using babashka via JVM or something like that |
No need to read deps.edn files, etc. This is what tools.deps already does. deps.clj is basically a tool and library which you can invoke as a script, but also as a JVM library, which replaces the clojure "front-end" bash/powershell script, but works identically to it. So from the JVM you could do:
|
TIL, really cool! |
@ericdallo No, deps.clj is only for deps.edn-based projects. |
I see, it'd work for deps projects, but we still need to scan other kinds of projects so @PEZ |
Yeah, Calva and clojure-lsp have different needs here. But deps.edn is special since the CLI tools are tied to powershell and there are several powershells and the tools get installed in different ways. I'm happy that I might have found a way to avoid the powershell mess for Calva's needs. At least as a temporary way. |
Does this mess spill over into lein installs / projects too? Or does |
For lein we use cmd.exe, so it isn't affected. |
From #387 (comment)
Calva should by default use the current
pwsh.exe
, but also offer a legacy option.The text was updated successfully, but these errors were encountered: