Skip to content

Update: jre 17 -> jre 21#849

Merged
jeaye merged 2 commits intojank-lang:mainfrom
prairir:main
Feb 24, 2026
Merged

Update: jre 17 -> jre 21#849
jeaye merged 2 commits intojank-lang:mainfrom
prairir:main

Conversation

@prairir
Copy link
Contributor

@prairir prairir commented Feb 19, 2026

This fixes #848

verification

$ java --version
openjdk 21.0.4 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode, sharing)
$ npx shadow-cljs compile test
(node:28790) ExperimentalWarning: CommonJS module /nix/store/cgkpjpl1hspg30dlmv4hhvlhbvik1bn1-nodejs-2
3.2.0/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /nix/store/cgkpjpl1hspg
30dlmv4hhvlhbvik1bn1-nodejs-23.2.0/lib/node_modules/npm/node_modules/supports-color/index.js using req
uire().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
shadow-cljs - config: /home/ryanp/dev/clojure-test-suite/shadow-cljs.edn
[:test] Compiling ...
========= Running Tests =======================
...

@jeaye
Copy link
Member

jeaye commented Feb 19, 2026

Thanks for the PR! Curiously, this causes babashka to fail in CI. 🤔

@prairir
Copy link
Contributor Author

prairir commented Feb 19, 2026

I think I found the issue. It breaks with different babashka versions. Looks like babashka has a regression.

this is with latest bb

$ bb --version        
babashka v1.12.215

$ bb test-bb

Running tests in #{"test"}
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Unable to resolve symbol: ->MyType
Data:     {:type :sci/error, :line 7, :column 3, :file "/home/ryanp/dev/clojure-test-suite/test/clojure/core_test/empty.cljc", :phase "analysis"}
Location: /home/ryanp/dev/clojure-test-suite/test/clojure/core_test/empty.cljc:44:27
Phase:    analysis

----- Context ------------------------------------------------------------------
40: 
41:     (when-var-exists deftype
42:       (testing "datatype"
43:         (deftype MyType [field])
44:         (is (= nil (empty (->MyType ""))))))))
                              ^--- Unable to resolve symbol: ->MyType

----- Stack trace --------------------------------------------------------------
clojure.core-test.empty                        - /home/ryanp/dev/clojure-test-suite/test/clojure/core_test/empty.cljc:44:27
clojure.core/empty                             - <built-in>
clojure.core-test.empty/list                   - /home/ryanp/dev/clojure-test-suite/test/clojure/core_test/empty.cljc:44:20
clojure.core-test.empty                        - /home/ryanp/dev/clojure-test-suite/test/clojure/core_test/empty.cljc:44:20
clojure.core/list                              - <built-in>
... (run with --debug to see elided elements)
cognitect.test-runner.api/do-test              - /home/ryanp/.gitlibs/libs/io.github.cognitect-labs/test-runner/dfb30dd6605cb6c0efc275e1df1736f6e90d4d73/src/cognitect/test_runner/api.clj:6:1
cognitect.test-runner.api                      - /home/ryanp/.gitlibs/libs/io.github.cognitect-labs/test-runner/dfb30dd6605cb6c0efc275e1df1736f6e90d4d73/src/cognitect/test_runner/api.clj:28:30
exec-d13492a9-b426-4fdf-b9a1-6acb3514d738/exec - NO_SOURCE_PATH:24:1
exec-d13492a9-b426-4fdf-b9a1-6acb3514d738      - NO_SOURCE_PATH:4:1
user-2f98abd2-0afc-4df1-bada-54f1b5653f68      - NO_SOURCE_PATH:38:1

exact same errror as in github actions

but if I use v1.12.214, the release active at the last actions run, it passes

$ bb --version
babashka v1.12.214

$ bb test-bb
...
Ran 227 tests containing 5360 assertions.
0 failures, 0 errors.

I think this is being caused by bb: latest in .github/workflows/ci. The fix should just be pinning a version.

That being said, im not sure how this project handles regressions like this.

@jeaye
Copy link
Member

jeaye commented Feb 19, 2026

@borkdude Is this a known regression?

@borkdude
Copy link
Contributor

@jeaye Not yet known but I did change some deftype code so could very well be! Can you post an issue? I'll take a look tomorrow.

@jeaye
Copy link
Member

jeaye commented Feb 19, 2026

That being said, im not sure how this project handles regressions like this.

We ask borkdude. 🙃 Looks like this is a new regression (great find)! Are you up for reporting this on the babashka repo? Once it's fixed, we can update this PR to use the new bb version along with the updated JRE.

@prairir
Copy link
Contributor Author

prairir commented Feb 19, 2026

Perfect! I made the issue. Glad the test suite is already working 😄

borkdude added a commit to borkdude/clojure-test-suite that referenced this pull request Feb 20, 2026
The dev build contains a fix not yet in a release.

See jank-lang#849 (comment)
@borkdude
Copy link
Contributor

Fixed in bb. Thanks for reporting. Made a PR which uses the dev-build to run bb tests. I think this is a good idea anyway so I can catch issues like this before release.

jeaye pushed a commit that referenced this pull request Feb 20, 2026
* Use babashka dev build in CI

The dev build contains a fix not yet in a release.

See #849 (comment)

* Fix bb path conflict in CI

Install babashka dev build to /tmp to avoid conflict with the bb/ directory.
@jeaye
Copy link
Member

jeaye commented Feb 20, 2026

If you merge main in, we should be good to go.

@prairir
Copy link
Contributor Author

prairir commented Feb 24, 2026

Merged in 😎

@jeaye
Copy link
Member

jeaye commented Feb 24, 2026

Thank you!

@jeaye jeaye merged commit ec67c69 into jank-lang:main Feb 24, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

Unable to build clojurescript. jscomp is built with more recent JRE

3 participants