reader: feature set #{:jolt :default}, clause-order matching (RFC 0002)
jolt no longer satisfies :clj in reader conditionals. The shortcut was a measured net liability: :clj branches carry JVM interop and JVM-specific test expectations jolt fails, and they shadowed :default branches jolt passes. A/B over the suite: clj,default = 4967 assertions / 4324 pass / 119 errors; jolt,default = 5069 / 4470 / 81 (+146 pass, -38 errors, +8 clean files). Baselines raised to 4470/86. Matching is now by CLAUSE order like Clojure — the first clause whose key is in the feature set wins (#?(:default 5 :clj 6) is 5 everywhere); the old code scanned for :clj first, then :default, regardless of position. Foreign clj-targeted libraries are a property of the LOADING CONTEXT, not the platform: reader-features-set! opts a load into a compatibility set, and the SCI bootstrap/runtime tests load SCI under ["jolt" "clj" "default"] (its .cljc selects implementations via :clj with no :jolt branches). JOLT_FEATURES remains the process-wide override. RFC 0002 records the decision with the measured data; spec 02-reader S18 is now normative (clause order, documented feature set, per-context override). Reader tests updated to the portable set + an opt-in round-trip.
This commit is contained in:
parent
2224e40afc
commit
fdfd086df6
8 changed files with 164 additions and 33 deletions
|
|
@ -43,9 +43,9 @@
|
|||
# Raised 4004 -> 4034 / clean 66 -> 67 porting partition-all + repeatedly to the
|
||||
# overlay, which required fixing two leniencies (a char is not callable; take
|
||||
# validates its count) — correct beyond those fns, so the suite rose broadly.
|
||||
(def baseline-pass 4324)
|
||||
(def baseline-pass 4470)
|
||||
# A file is "clean" when it ran with zero failures AND zero errors.
|
||||
(def baseline-clean-files 78)
|
||||
(def baseline-clean-files 86)
|
||||
# Per-file wall-clock budget (seconds). Normal files finish in well under 1s, so
|
||||
# this normally only fires on genuinely-infinite-sequence hangs. It's an env var
|
||||
# (JOLT_SUITE_TIMEOUT) so CI — whose runners are slower than a dev machine — can
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
(use ../../src/jolt/types)
|
||||
(use ../../src/jolt/reader)
|
||||
(use ../../src/jolt/api)
|
||||
(use ../../src/jolt/reader)
|
||||
# SCI is a clj/cljs-targeted library: its .cljc sources select implementation
|
||||
# via #?(:clj ...) and have no :jolt branches — load it under clj-compat
|
||||
# features (spec 02-reader S18: feature sets are a property of the loading
|
||||
# context; the portable default is #{:jolt :default}).
|
||||
(reader-features-set! ["jolt" "clj" "default"])
|
||||
|
||||
(def ctx (init))
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
(use ../../src/jolt/types)
|
||||
(use ../../src/jolt/reader)
|
||||
(use ../../src/jolt/api)
|
||||
(use ../../src/jolt/reader)
|
||||
# SCI is a clj/cljs-targeted library: its .cljc sources select implementation
|
||||
# via #?(:clj ...) and have no :jolt branches — load it under clj-compat
|
||||
# features (spec 02-reader S18: feature sets are a property of the loading
|
||||
# context; the portable default is #{:jolt :default}).
|
||||
(reader-features-set! ["jolt" "clj" "default"])
|
||||
|
||||
(defn- load-stubs [ctx filepath]
|
||||
(var s (slurp filepath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue