Skip to content

Expose function abs (issue 402) and cljs.core/Cons in SCI config by adding entries to core.cljs' clojure.core namespace map#403

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

Conversation

@franks42
Copy link
Contributor

@franks42 franks42 commented Dec 9, 2025

  • Add 'abs (sci/copy-var abs core-ns) for math absolute value function (issue 402)
  • Add 'Cons cljs.core/Cons for type checking with instance?

This allows (abs -42) and (instance? cljs.core/Cons x) to work in nbb. Libraries like Trove need Cons for type checking in their const-form? function.

Tested with code in gist "https://gist.github.com/franks42/345be2b3baebc1bb0848ce2ffa7e16cf" - tests fail with currently released nbb "1.3.204", and tests succeed with nbb compiled with proposed changes.

Regards, Frank.

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

Issue 402 is resolved with this fix.
Cons fix does not have issue associated with it but was discussed in slack's trove channel.

  • This PR contains a test to prevent against future regressions

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

- Add 'abs (sci/copy-var abs core-ns) for math absolute value function
- Add 'Cons cljs.core/Cons for type checking with instance?

This allows (abs -42) and (instance? cljs.core/Cons x) to work in nbb.
Libraries like Trove need Cons for type checking in their const-form? function.
@borkdude borkdude merged commit 38968e9 into babashka:main Dec 9, 2025
4 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.

2 participants

Comments