Repository navigation
refactor: delete code in the core builder that never ran - #446
Merged
Merged
Conversation
Remove code that never ran in a real build, or never changed a build's output: - four freeze-preparation calls to methods that do not exist, each inside a handler that swallowed the resulting error; - an unused tag-slug helper; - the reference-index front-matter updater, which returned at once because the page is written later, and whose two keys the API reference writer already sets; - the copy of a renderer asset that no longer ships; - the resource-loading fallback for Python versions below the supported minimum; - the snapshot auto-save for non-versioned builds, which was unreachable. Auto-save stays for versioned builds. Also remove three keys of the API categories that nothing read (member types and the class and function unions), along with the code that computed only them: sub-classifying methods and the loop over `ClassName.method` references. A `ClassName.method` reference still puts its class under `classes`, and a new test covers that. The tests of the removed code go too. Behaviour is unchanged: the characterisation harness matches `main` on all cases.
The multi-version guide said a snapshot is saved after every successful build. Only versioned builds save one.
📚 Preview this PR's docs locallyFetch the just-built site and open it in your browser: # this exact build
great-docs preview --run 40541919913
# or always the latest build for this PR
great-docs preview --pr 446Auth & tips
|
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 PR removes code from the core builder that never ran in a build or never changed its output. Freeze preparation called four methods that do not exist, each inside a handler that swallowed the error, and snapshot auto-save had a branch for non-versioned builds that could not be reached. Other pieces had outlived their callers: a tag-slug helper, a reference-index front-matter updater that ran before the page existed, the copy of a renderer asset that no longer ships, a fallback for Python versions below the supported minimum, and three keys of the API categories that nothing read.
The multi-version guide also promised an API snapshot after every successful build. It now says after every successful versioned build, which is what Great Docs does.