Expose cljs.core/Cons in SCI config in scittle/core.clj for the clojure.core namespace#142
Merged
borkdude merged 1 commit intobabashka:mainfrom Dec 9, 2025
Merged
Expose cljs.core/Cons in SCI config in scittle/core.clj for the clojure.core namespace#142borkdude merged 1 commit intobabashka:mainfrom
borkdude merged 1 commit intobabashka:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
[ x] I have read the developer documentation.
This PR corresponds to an issue with a clear problem statement.