Repository navigation
python: drop a starlight-pydocs registry left by a dev restart without pydocs - #44
Merged
Merged
Conversation
…t pydocs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
This is the opposite case of #41. starlight-pydocs publishes its symbols at
globalThis[Symbol.for('starlight-pydocs')], and that global also stays after an in-placeastro devrestart that removes starlight-pydocs from the config. The Python adapter then still links names in code blocks to API pages that no longer exist, which gives 404 links in dev. starlight-pydocs cannot clear it, because none of its hooks run after it is removed, so codeblocks drops it.dropStalePydocsRegistry(integrations)inadapters/python.tsdeletes the pydocs registry when no integration in the config is namedstarlight-pydocs.codeblocksIntegrationcalls it at the start ofastro:config:setup. That hook runs with and without Starlight.astro:config:setup, so it relies on the pydocs integration already being inconfig.integrationsat that point.config:setup, before either integration's hook runs. Without Starlight, the site lists both.starlight-pydocsis in the list and goes when it is not.astro:config:setupwith a fake config now passintegrations: [].The pydocs side of the same problem is in ewels/starlight-pydocs#10.
🤖 Generated with Claude Code