Scrub local paths from generated docs#620
Closed
RoyalPineapple wants to merge 1 commit into
Closed
Conversation
97bb034 to
6fa0d25
Compare
- Stop tracking docs/JSON/*.json. Sourcekitten embeds the absolute build path in every key.filepath entry (~3400 per file), so each release commit churned ~5900 lines and leaked the releaser's home directory. The JSON is intermediate sourcekitten output that jazzy consumes — it doesn't need to be in version control. Most popular Swift libraries (RxSwift, Alamofire, swift-protobuf, Blueprint) don't commit it either. - Stop tracking docs/**/undocumented.json. Jazzy writes the absolute build path into source_directory; the file is otherwise empty.
6fa0d25 to
01050e8
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.
Two doc artifacts were embedding the build machine's absolute path:
docs/JSON/*.json— sourcekitten'skey.filepathis absolute (~3400 entries per file).maincurrently has/Users/johnnewman/...baked in.docs/**/undocumented.json— jazzy writes the build path intosource_directory; the file is otherwise empty.Both are intermediate output. The JSON is consumed by jazzy in the next step of the script and nothing else reads it;
undocumented.jsonrecords nothing useful. Gitignoring them and regenerating per run fixes the leak and removes ~127k lines of churn from future release diffs.Changes
.gitignore: adddocs/JSON/anddocs/**/undocumented.json.Scripts/generate_docs.sh:mkdir -p docs/JSONbefore sourcekitten writes into it.Rendered HTML and docsets stay committed.
Why before #619
#619 regenerates docs as part of the release. With this merged first, #619's release commit is just the version bump, CHANGELOG, and small docset deltas.