#246 defsetf is missing — uiop (defsetf getenv) fails with "attempt to call an undefined function"

closed
Opened by atgreen

asdf.lisp:2145 (defsetf getenv (x) (val) …) errors at load: "; Error: attempt to call an undefined function | in: DEFSETF GETENV". Direct probe confirms: (defsetf g1 s1) => same error at the REPL — the defsetf macro does not exist (neither short nor long form).

Needed for uiop/os (setf getenv) and generally for ANSI setf-expander coverage. Related: remf also missing (tracked in compiler-gaps notes).

Found triaging the 24 residual (load "./asdf.lisp") errors under #205.

Comments (1)

atgreen3992442393

Fixed in 35f64ce. defsetf short + long form as SETF- macro generation riding the existing setf fallthrough. Verified on build/funcl: short form (defsetf my-get my-upd) and the uiop shape (defsetf env-get (x) (val) `(progn …)) both store and read back correctly.

Two campaign learnings baked into the commit:

  1. %setf-symbol is a tree-walker-only head (eval.lisp special case, not a function) — compiled prelude macro bodies must use intern+concatenate instead.
  2. NEW prelude macro names only register via the image bake (make build); build/funcl-stage2's runtime stdlib reload refreshes existing macro bodies but silently drops new macro names — probing new prelude macros against stage2 is a trap. Filed separately.