Skip to content

Incompatibility with setup-java v4 (Amazon Corretto 21) when using only cli #125

@teruchi

Description

@teruchi

Description:

I encountered an issue when using setup-java (with Amazon Corretto 21) together with setup-clojure.

What Works

In a job where I only install clj-kondo and cljstyle to run linters, everything works fine.
Here’s the full step configuration:

- name: Setup java
  uses: actions/setup-java@v4
  with:
    distribution: corretto
    java-version: 21

- name: Install clojure tools
  uses: DeLaGuardo/[email protected]
  with:
    clj-kondo: 2023.12.15
    cljstyle: 0.15.0

- name: Clojure lint
  run: |
    cljstyle check --report -v
    clj-kondo --lint src:test

What Fails

In a separate job where I only install the cli tool and try to run tests using kaocha, I get the following error:

/tmp/usr/local/opt/ClojureTools/bin/clojure: line 436: /__t/Java_Corretto_jdk/21.0.7-6.1/x64/bin/java: cannot execute: required file not found

Here is the job step config:

- name: Setup java
  uses: actions/setup-java@v4
  with:
    distribution: corretto
    java-version: 21

- name: Install clojure tools
  uses: DeLaGuardo/[email protected]
  with:
    cli: 1.12.0.1488

- name: Clojure test
  run: |
    clojure -M:dev:test

Notes

  • Both jobs use actions/setup-java@v4 with the same configuration.
  • This issue did not occur before I started using setup-java. Both jobs worked correctly without it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions