squint

Chris McCormick 2026-01-24T14:23:12.313599Z

Hello! Is this intended?

$ npx squint -e '(pr-str js/undefined)'
file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3026
  return `#object[${value.constructor.name}]`;
                          ^

TypeError: Cannot read properties of undefined (reading 'constructor')
    at toEDN (file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3026:27)
    at file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3030:27
    at Array.map (<anonymous>)
    at Module.pr_str (file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3030:13)
    at file:///home/chrism/dev/eucalypt/.tmp4E5F53/squint.mjs:2:13
    at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)

Node.js v20.19.4
Latest Squint.

Chris McCormick 2026-01-28T11:30:43.197999Z

Amazing, will test, thank you!

borkdude 2026-01-27T10:14:02.541459Z

All of these have been fixed and released

🎉 1
borkdude 2026-01-24T14:24:08.644769Z

Not intended!

borkdude 2026-01-24T14:24:13.306659Z

issue/PR welcome!

👍 1
Chris McCormick 2026-01-24T14:49:52.410849Z

If found another weird one. (I'm upgrading Squint to latest in Eucalypt). A lazy sequence inside and/or/cond causes the Vite compiler to throw an error. Apparently this is not valid JS syntax (although Node runs it, Vite does not like it):

12: if (squint_core.truth_((alive_QMARK_5 && yield* ((function* () {
                                             ^
https://github.com/squint-cljs/squint/issues/793

Chris McCormick 2026-01-24T14:50:49.844299Z

This was working in 0.9.174 so I guess something changed to do with generators.

borkdude 2026-01-24T14:51:23.016759Z

oh that's bad

borkdude 2026-01-24T14:51:28.463779Z

repro welcome

borkdude 2026-01-24T14:51:40.392879Z

I did some optimizations that were probably too dangerous

1
Chris McCormick 2026-01-24T14:51:42.866719Z

There's a repro in the issue that should hopefully be simple to deploy.

Chris McCormick 2026-01-24T14:51:55.265339Z

You create two files in a directory and then run squint and then vite.

borkdude 2026-01-24T14:52:17.614399Z

ah you already made an issue, great