-
Notifications
You must be signed in to change notification settings - Fork 29
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
Consider using the new officially sanctioned clj-msi when installing clojure on Windows #65
Comments
The latest version got a fix to run clojure tools deps on windows the same way as on other platforms. https://github.com/DeLaGuardo/setup-clojure/blob/main/.github/workflows/smoke-tests.yml#L31-L52 |
Thanks for the reply! By cli, you mean the Clojure official Windows PowerShell module, right? Can I still use borkdude's deps.exe (renamed to clojure) on Windows? Or are you saying that (Sorry if the answer is obvious, I'm feeling a little not-so-bright here! 🙂) |
I've never written a GitHub Action, so I am probably missing something, but I don't see anything calling getLatestDepsClj. |
Right, getLatestDepsClj is not used anymore. Instead, when you use input jobs:
run-clojure-cli:
strategy:
matrix:
# note all three available platforms
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- name: Install Clojure CLI
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.693
# step uses clojure command is the same across all platforms
- name: Execute clojure code
run: clojure -e "(+ 1 1)" |
Ah, thanks for the clarification! I use @borkdude's Anyway, these days I can always use |
|
Another reason you might want to use |
interesting, thanks! Btw. |
Yes, I'm talking about shelling out from e.g. a clojure program or bb script, not in the Github Actions "code". |
got it. That sounds like a good reason to add |
This environment variable might also be interesting: |
Yes, what @borkdude said 🙂. If/when you do re-add deps.exe as clojure.exe on Windows, it would be extra convenient if I could express I'd like to use this on Windows without repeating a |
yes, it will install Btw. could you share an example of the process that is hard to grok on windows with "official powershell cli"? Then I can add it to the test suite to capture regressions, if any |
The exit code for PowerShell launches directly from GitHub Actions is handled properly, but if you call clojure yourself from a script you have to be aware of this:
I don't have specific examples of escaping woes, but I've felt them. I do see an old slack post from me about me about trying to install clojure core team cli:
I think you've solved the installation part of this problem with your setup-clojure Action, but not the easily "runnable from any shell" part. If you want a blurb for the README, maybe something like?: cmd-exe-workaround Some people bump into challenges using the clojure core team alpha |
thanks! |
Afterthought: Maybe: |
or |
I was thinking Is it shortsighted of me to assume deps.clj only on Windows? Would someone find a case where they wanted to use a |
On Slack @borkdude mentioned:
|
In that context, I meant Windows: not ever has someone request e.g. an aarch64 binary for deps.exe on Windows. |
Ah, thanks! I wrongly assumed you meant that folks only used the deps binary on Windows. |
Well, I think that is mostly the case since deps.clj as a binary it solves a problem on Windows mostly. |
I think you could now try clj-msi as the workaround on Windows: https://github.com/casselc/clj-msi/releases This packages deps.clj as |
Update: clj-msi has become the official way to install Clojure on Windows. There should be no need to install the old PowerShell modules anymore. I'll rename this issue accordingly. |
@DeLaGuardo I could attempt a PR to move to the new official |
Fixed in #114 |
Thank you! |
Hiya!
I am excited to see support for
deps.exe
(asclojure.exe
) on Windows.Thanks so much for adding that as a feature!
The current README suggests selecting via:
But the source code sez
cmd-exe-workaround
is deprecatedsetup-clojure/action.yml
Lines 17 to 24 in 3199aaa
But I don't know what a "unified cli input" is.
Let's say I have a matrix build for macOS, Windows, and Linux, how should I select
deps.exe
(asclojure.exe
) for windows?The text was updated successfully, but these errors were encountered: