#249 define-system-virtual-slot-readers: expansion fails with "The value \"SYSTEM-\" is not a VECTOR (vector access)" — strcat/intern works at REPL

closed
Opened by atgreen

asdf.lisp:8877 (defmacro define-system-virtual-slot-readers () …(intern (strcat "SYSTEM-" (string name)))…) — expanding the macro at load errors: "; Error: The value "SYSTEM-" is not a VECTOR (vector access). | in: DEFINE-SYSTEM-VIRTUAL-SLOT-READERS".

REPL probe passes: (concatenate (quote string) "SYSTEM-" (symbol-name (quote foo))) => "SYSTEM-FOO". So the same string operation fails only when the "SYSTEM-" literal arrives through the macro-body path — smells like the compiled-quote string literal has a different representation than runtime strings on that path (string sibling of the symbol identity splits / ADR 0026 / #227).

Downstream cost: all system virtual-slot readers (system-description &c.) go undefined, contributing to the late "not a function" cascade.

Found triaging the 24 residual asdf-load errors under #205.

Comments (2)

atgreen3992445091

Root cause was NOT a string-literal rep split — retitling in spirit: src/stdlib.lisp had TWO replace definitions, and the later naive one (raw vector-set/aref via %replace-walk) shadowed the earlier string-aware dispatch. Any (replace string-out string-in …) hit the vector guard with the SOURCE string as datum — hence "The value "SYSTEM-" is not a VECTOR" from uiop reduce/strcat (strcat) inside define-system-virtual-slot-readers.

Diagnosis: instrumented copy of asdf.lisp printing each subexpression of the macro (VSR-P1..P4) pinned the failure to strcat; post-load probes showed strcat fails even on two literals while (apply (quote concatenate) …) works; a no-load probe of (replace (make-string 5) "XY" :start1 1) reproduced it directly.

Fixed in b0d08a9 by deleting the shadowing duplicate. Probed replace on strings/vectors/lists incl. :start1/:end1 on stage2 and the baked binary. Closing after the #205 re-census.

Side note for the ledger: neither the funcl-raise-not-vector spin-trap nor a gdb breakpoint on its baked symbol caught this raise — the guard-call path binds some other copy/address. Worth understanding as part of the JIT-DWARF work (#231).

atgreen3992445249

Re-census on the rebuilt binary: the "SYSTEM-" not-a-VECTOR error is gone and the three downstream "NIL is not a VECTOR | in: IF" errors shifted to "no accessor | in: IF" (mini-clos accessor territory, likely the #244/#209 cluster) — replace-on-strings was upstream of those too. Closing.