Skip to content

Commit 410b046

Browse files
committed
feat(nrepl): advertise versions.clojurewasm for the CIDER REPL banner
Smell-audited: 1: babashka-precedent plain-string key ("babashka" is how babashka.nrepl gets its banner line); "cljw" alias kept for existing tooling; CIDER-side branch is an upstream patch (draft in private/notes/cider-clojurewasm-banner-patch.md). CIDER's cider-repl--banner hardcodes three branches (Clojure / Babashka / basic) keyed on describe's versions dict; cljw previously fell to the basic banner (no runtime line). versions now carries "clojurewasm" so a CIDER clojurewasm branch (upstream PR) — or a user-side advice — can render ";; ClojureWasm <version>". e2e 4g asserts the new key.
1 parent b11bae1 commit 410b046

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

‎.dev/handover.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@
4040
unicode_category.zig; charset.zig evaluates the JVM formulas. The one
4141
member out: `getName` (explicit unsupported, **D-561** — size-heavy
4242
name table vs gap II). Corpus `clj_corpus/character.txt` (154 golden)
43-
locks parity; e2e phase14_character_statics extended.
43+
locks parity; e2e phase14_character_statics extended. nREPL describe
44+
now advertises `versions.clojurewasm` (babashka-precedent CIDER-banner
45+
key; CIDER upstream patch draft + init.el advice:
46+
`private/notes/cider-clojurewasm-banner-patch.md`).
47+
- **NEXT (user-directed 2026-07-15)**: CIDER completion parity — kill the
48+
`(rt)` ns leak (show clojure.core), add kind annotations (<s>/<m>/<v>),
49+
class + static-member candidates. Design directive: mechanically
50+
extract the canonical surface FROM mainline clj into a data file
51+
(EDN; F-013 definition-derived), cljw consumes it via a fixed
52+
convention/layer — parity audit falls out as a by-product.
4453
- **First task on resume**: self-select from the live `active:` list,
4554
easiest-first (D-523's architecture/wasm-demo residual + D-522 drain 3
4655
landed 2026-07-14; D-430 is DISCHARGED — the prior pointer here was

‎src/app/nrepl/ops.zig‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ fn opDescribe(ctx: *Ctx) anyerror!void {
137137
const nrepl_version = [_]bencode.Decoded.Entry{
138138
.{ .key = "version-string", .value = .{ .str = "1.3.1" } },
139139
};
140+
// "clojurewasm" is the plain-string runtime-version key CIDER-style
141+
// clients read for the REPL banner — the same shape babashka.nrepl
142+
// advertises under "babashka" (CIDER's banner branches on that key;
143+
// a ClojureWasm branch reads this one). "cljw" is the short alias
144+
// kept for existing tooling.
140145
const versions = [_]bencode.Decoded.Entry{
141146
.{ .key = "cljw", .value = .{ .str = build_options.version } },
147+
.{ .key = "clojurewasm", .value = .{ .str = build_options.version } },
142148
.{ .key = "nrepl", .value = .{ .dict = &nrepl_version } },
143149
};
144150
try ctx.respond(&.{

‎test/e2e/phase14_nrepl.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ vers = next(r.get("versions") for r in dm if isinstance(r, dict) and "versions"
394394
cljw_v = vers.get("cljw")
395395
cljw_v = cljw_v.decode() if isinstance(cljw_v, bytes) else cljw_v
396396
assert real_version and real_version in str(cljw_v), f"describe version {cljw_v!r} != binary version {real_version!r}"
397+
# "clojurewasm" is the CIDER-banner key (babashka-precedent plain string,
398+
# same value as "cljw").
399+
cw_v = vers.get("clojurewasm")
400+
cw_v = cw_v.decode() if isinstance(cw_v, bytes) else cw_v
401+
assert cw_v == cljw_v, f"versions.clojurewasm {cw_v!r} != versions.cljw {cljw_v!r}"
397402
print(f"PASS nrepl_describe_derived -> cljw {cljw_v}")
398403
399404
# 4h. ns honoring: an eval naming a nonexistent ns fails with

0 commit comments

Comments
 (0)