Skip to content
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

Latest clojure cli is not always immediately available for clj-msi #115

Open
lread opened this issue Jan 13, 2025 · 1 comment
Open

Latest clojure cli is not always immediately available for clj-msi #115

lread opened this issue Jan 13, 2025 · 1 comment

Comments

@lread
Copy link

lread commented Jan 13, 2025

Problem

Rewrite-clj tests against the latest clojure cli.

This works great for macOS and Linux, but can fail for Windows.

Symptom

Output from Github Actions

Run DeLaGuardo/setup-clojure@13.1
  with:
    bb: latest
    cli: latest
    github-token: ***
    invalidate-cache: false
  env:
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.432-6\x64
    JAVA_HOME_8_X64: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.432-6\x64
"C:\Program Files\GitHub CLI\gh.exe" release -R casselc/clj-msi download v1.12.0.1495 -D D:\a\_temp\d163dc0c-542e-4ef2-a760-3d5b1a24292f
C:\Windows\system32\tar.exe xz -C D:\a\_temp\1a39702d-bedd-450e-a555-19b8e13c5685 -f D:\a\_temp\a4ffce3c-9407-4053-95d8-cf30adb4a30d
release not found
Error: The process 'C:\Program Files\GitHub CLI\gh.exe' failed with exit code 1

Guess

My strong guess is that setup-clojure is assuming the current release of clojure cli is always available for clj-msi.

This is not always the case. Clj-msi can lag a bit.
As of this writing clojure cli version 1.12.0.1495 has been released but clj-msi is still at older version 1.12.0.1488.

Ideas

  1. Consult github for the latest release of clj-msi, maybe via:
    https://api.github.com/repos/casselc/clj-msi/releases/latest

  2. Since you seem to be using gh, you can ask for the latest release by omitting the version, for example:

    gh release download -R casselc/clj-msi --pattern '*.msi'
    

Next Steps

Happy to help, lemme know.

@lread
Copy link
Author

lread commented Jan 13, 2025

Update: The clj-msi and clojure cli versions happen to be in sync now (at the time of this writing) but we should not rely on this because it will not always be true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant