Skip to content

Fix clojure version and windows#16

Open
IamDrowsy wants to merge 2 commits into
pfeodrippe:mainfrom
IamDrowsy:fix-clojure-and-windows
Open

Fix clojure version and windows#16
IamDrowsy wants to merge 2 commits into
pfeodrippe:mainfrom
IamDrowsy:fix-clojure-and-windows

Conversation

@IamDrowsy

Copy link
Copy Markdown

I wanted to try out this library but stumbled upon two issues:

ClassCastException in clojure 1.11.1

Trying to start a browser with clojure 1.11.1 fails with:

Execution error (ClassCastException) at java.lang.Class/cast (Class.java:4067).
Cannot cast wally.main$make_page$fn__2605$fn__2609 to java.util.function.Consumer

when trying to set a function as .onClose handler.
Using clojure 1.12.1 as dependency fixes this

Error when using on windows

Using (java.net.URI. (str "file://" (.getAbsolutePath user-data-dir)) fails on windows because it results in a "file://C:\\User\\...." which is not a valid uri.
As user-data-dir already is an java.io.File we can use (.toURI user-data-dir) which should be os independent.

Albrecht Schmidt added 2 commits August 8, 2025 07:49
Trying to start a browser with clojure 1.11.1 fails with:

Execution error (ClassCastException) at java.lang.Class/cast (Class.java:4067).
Cannot cast wally.main$make_page$fn__2605$fn__2609 to java.util.function.Consumer

when trying to set a function as .onClose handler.

Switching to Clojure 1.12.1 fixes this.
Using `(java.net.URI. (str "file://" (.getAbsolutePath user-data-dir))` fails on windows because it results in a `"file://C:\\User\\...."` which is not a valid uri.
As `user-data-dir` already is an `java.io.File` we can use `(.toURI user-data-dir)` which should be os independent.
@pfeodrippe

Copy link
Copy Markdown
Owner

Ok, let me take a look o/ Thanks

pfeodrippe pushed a commit that referenced this pull request Jul 7, 2026
Addresses `ClassCastException` regression detailed in
#16.
(1.12, which added functional interface interop
([CLJ-2799](https://clojure.atlassian.net/browse/CLJ-2799)),
is required for the current code to compile).
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.

2 participants