Add assert macro to built-in-macros#164
Merged
borkdude merged 1 commit intosquint-cljs:mainfrom Nov 17, 2025
Merged
Conversation
ce8b853 to
49dcdb4
Compare
Contributor
Author
|
I amended #166 to have this changelog entry to avoid conflicts on main |
Contributor
Author
|
Tests are totally wrong -- I didn't actually compare them to the test suite format. Need to redo. |
Contributor
Author
|
Tests now added correctly to test suite. |
Member
|
This may not work the way you think it works. The tests run in CLJS, not in cherry. See the cherry.compiler-test for example. |
Contributor
Author
|
Added assert to macros, simple test added to compiler test. Removed the superfluous junk. |
Member
|
Oh wait, this was missing, although you did check that box: -I have updated the CHANGELOG.md file with a description of the addressed issue. Can you add that in a new PR? |
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.
Cherry was missing the 'assert entry in built-in-macros, causing (assert ...) to compile as assert.call() without any import, leading to 'assert is not defined' runtime errors.
This adds 'assert squint-macros/core-assert to match Squint's implementation, which properly expands assertions to (when-not x (throw ...)) instead of function calls.
Fixes compilation of assert in ES modules and browsers where no global assert exists.
Please answer the following questions and leave the below in as part of your PR.
This PR corresponds to an issue with a clear problem statement.
assert not exported #163
This PR contains a test to prevent against future regressions
I have updated the CHANGELOG.md file with a description of the addressed issue.