You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clojure reader fixes (6 bugs), fixed with tests in realgenekim/dryer fork #14
I'll have another PR coming in with some enhancements to compare methods inside defrecord, extend-protocol and the like, and to read syntax-quote gensyms (t0#). CRAP scores equal or higher than before. :)
Keep up the great work! (The rest written by Claude Code).
===
Six Clojure reader bugs on master, one commit each with a failing test, plus two follow-up commits that close gaps in items 4 and 6.
#_#_ a b c reads as b c. Clojure reads c.
#::alias{:a 1} reads as the symbol alias plus a map. Clojure reads one map.
(f #^String x) is a read error. #^ is the old spelling of ^.
#! hi mid-file takes ! as a tag that swallows the next form. Clojure reads #! as a line comment anywhere. A later commit ends that comment at \r as well as \n.
(clojure.core/ns demo) is compared as a candidate. Only a bare ns head was left out.
#'handle is a read error that drops the rest of the file. It now reads as (var handle). A later commit makes #' and #^ read past a discard: (#' #_x y) now reads ((var y)), as Clojure does.
Each new test fails on its commit's parent.
crapper src
master
this branch
tests
80 pass
88 pass
mean coverage
95.87%
96.69%
over CRAP 10
parse_args 16.0
parse_args 16.0
Every changed function has 100% coverage.
On a 126-file Clojure codebase, read warnings dropped from 15 to 4 and duplicate pairs rose from 65 to 76, because files that stopped at the first #' are now read in full.
Not included: Clojure rejects \a', and this reader accepts it. Known divergence, left as is: '#_ a b and @#_ a b read the quote or deref with no operand, where Clojure takes b. An existing test pins '#_x as (quote), so that's your call.
This is an offer, not a request. Take it, change it, or leave it.
Activity