Skip to content

Comments

Expose cljs.core/Cons in SCI config in scittle/core.clj for the clojure.core namespace#142

Merged
borkdude merged 1 commit intobabashka:mainfrom
franks42:main
Dec 9, 2025
Merged

Expose cljs.core/Cons in SCI config in scittle/core.clj for the clojure.core namespace#142
borkdude merged 1 commit intobabashka:mainfrom
franks42:main

Conversation

@franks42
Copy link
Contributor

@franks42 franks42 commented Dec 9, 2025

This allows (instance? cljs.core/Cons x) to work in Scittle code.

The Cons type exists in the compiled ClojureScript runtime but was not exposed by name in SCI's symbol table. Libraries like Trove need this for type checking in their const-form? function.
Discussed in slack's trove channel: "https://clojurians.slack.com/archives/C091TEH5G9Z/p1764977619521619?thread_ts=1764556869.604369&cid=C091TEH5G9Z"

There is a test in gist "https://gist.github.com/franks42/f743b631099bdf38d7bdf7db45f78cfb" that runs successfully on the compiled scittle.js and fails with the cdn-version of [email protected]

Wasn't sure about creating an issue first (?).

Regards, Frank.

--

Please answer the following questions and leave the below in as part of your PR.

  • I have updated the CHANGELOG.md file with a description of the addressed issue.

This allows (instance? cljs.core/Cons x) to work in Scittle code.

The Cons type exists in the compiled ClojureScript runtime but was not
exposed by name in SCI's symbol table. Libraries like Trove need this
for type checking in their const-form? function.
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