Skip to content

Surface failed introspection-namespace loads in the shadow-cljs path - #62

Merged
bbatsov merged 1 commit into
masterfrom
shadow-introspection-load-errors
Jul 18, 2026
Merged

Surface failed introspection-namespace loads in the shadow-cljs path#62
bbatsov merged 1 commit into
masterfrom
shadow-introspection-load-errors

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 18, 2026

Copy link
Copy Markdown
Member

The shadow-cljs completion path loaded the introspection namespace once per session (#6), but it marked the session loaded even when the (require ...) failed - caching the failure for the whole session and swallowing the error. When a browser runtime can't load the mranderson-inlined introspection ns (#47/#48), the user just gets no completions with no signal at all.

This extracts the loader into require-introspection-ns!, marks the session loaded only when the require succeeds, and prints the error otherwise - so the failure is diagnosable and retried instead of silently cached. Adds a unit test for both the success (loads once) and failure (uncached, surfaced, retried) paths.

This is hardening around #47/#48, not a full fix - reproducing and fixing the inlined-ns browser load still needs an mranderson-inlined build. Refs #47, #48.

The shadow-cljs completion path marked the session as having loaded the
introspection namespace even when the `(require ...)` failed, caching the
failure for the rest of the session and swallowing the error. A browser
runtime that can't load the (mranderson-inlined) introspection ns then just
returns no completions with no signal (#47/#48).

Extract the loader into `require-introspection-ns!`, mark the session loaded
only on success, and print the error otherwise so the failure is diagnosable
and retried rather than silently cached.

Refs #47, #48.
@bbatsov
bbatsov force-pushed the shadow-introspection-load-errors branch from f52b192 to dc92bcd Compare July 18, 2026 09:57
@bbatsov
bbatsov merged commit fe49d3c into master Jul 18, 2026
8 of 9 checks passed
@bbatsov
bbatsov deleted the shadow-introspection-load-errors branch July 18, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant