Skip to content

Scrub local paths from generated docs#620

Closed
RoyalPineapple wants to merge 1 commit into
mainfrom
aodawa/scrub-doc-paths
Closed

Scrub local paths from generated docs#620
RoyalPineapple wants to merge 1 commit into
mainfrom
aodawa/scrub-doc-paths

Conversation

@RoyalPineapple
Copy link
Copy Markdown
Collaborator

@RoyalPineapple RoyalPineapple commented May 27, 2026

Two doc artifacts were embedding the build machine's absolute path:

  • docs/JSON/*.json — sourcekitten's key.filepath is absolute (~3400 entries per file). main currently has /Users/johnnewman/... baked in.
  • docs/**/undocumented.json — jazzy writes the build path into source_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.json records nothing useful. Gitignoring them and regenerating per run fixes the leak and removes ~127k lines of churn from future release diffs.

Changes

  • .gitignore: add docs/JSON/ and docs/**/undocumented.json.
  • Scripts/generate_docs.sh: mkdir -p docs/JSON before sourcekitten writes into it.
  • Remove the four existing tracked copies.

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.

@RoyalPineapple RoyalPineapple marked this pull request as ready for review May 27, 2026 16:37
@RoyalPineapple RoyalPineapple force-pushed the aodawa/scrub-doc-paths branch 2 times, most recently from 97bb034 to 6fa0d25 Compare May 28, 2026 08:45
- 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.
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