Surface failed introspection-namespace loads in the shadow-cljs path - #62
Merged
Conversation
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
force-pushed
the
shadow-introspection-load-errors
branch
from
July 18, 2026 09:57
f52b192 to
dc92bcd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.