Skip to content

Say that docs/api is git ignored rather than committed - #2940

Merged
pyricau merged 1 commit into
mainfrom
fix-the-agents-md-claim-that-d
Aug 5, 2026
Merged

Say that docs/api is git ignored rather than committed#2940
pyricau merged 1 commit into
mainfrom
fix-the-agents-md-claim-that-d

Conversation

@pyricau

@pyricau pyricau commented Aug 5, 2026

Copy link
Copy Markdown
Member

AGENTS.md claimed docs/api was Dokka output committed to the repo. It has been git ignored since 5abae5d77 ("Prepare 2.9 release", April 2022), which untracked every docs/api file and added the directory to .gitignore in the same commit. git ls-files docs/api returns nothing and the directory does not exist in a fresh clone.

Both release guides already have this right — docs/releasing.md:155 and docs/releasing-shark-explorer.md:81 run rm -rf docs/api && ./gradlew siteDokka before mkdocs gh-deploy precisely because the directory is not there, and the shark-explorer guide states the reason in prose. Only AGENTS.md misstated it, so this is a docs correction, not a build change.

That line sent me looking for a directory to regenerate after the public API change in #2938 — the exact failure this file exists to prevent.

Why it moved out of "Things that will bite you"

Nothing about a generated, git-ignored directory is surprising once stated, so it is not a bite. The moment the fact is actually useful is when you have just changed the public API and are deciding what to regenerate — which is next to updateKotlinAbi in the command list. The contrast is the point: updateKotlinAbi produces something you commit, siteDokka does not. The half of the old warning that still holds — fix the KDoc, not the generated pages — is kept.

Rest of the file

Checked every other factual claim for the same kind of drift; all still hold:

  • checkKotlinAbi/updateKotlinAbi/siteDokka/installGitHooks all exist in the root build.gradle.kts, and the two-mechanism explanation matches the Android hand-rolled tasks there.
  • modulesWithoutPublicApi exists and is the exemption list described.
  • Layout table matches settings.gradle and the directories on disk.
  • Java 8 source/target compatibility repo wide; CI runs ./gradlew build.
  • HprofRetainedHeapPerfTest and HprofIOPerfTest are both in shark-android.
  • detekt config at config/detekt-config.yml, hook installed from assemble and clean.
  • Changelog legend still has 💥 as crash fix and ⚠️ as breaking change.
  • assertjCore.android pinned to 3.15.0 with the API 24 explanation in the catalog.
  • shark/shark-explorer is the one scoped guide, paired AGENTS.md + CLAUDE.md as documented.

One thing I noticed but did not change: the instrumentation-test sentence names four modules, and samples/leakcanary-android-sample also has an androidTest source set (one test). CI does not run connectedCheck on it — .github/workflows/main.yml:108 runs exactly the four modules listed — so the sentence is right about what CI covers. Flagging it in case you want the wording to distinguish "has instrumentation tests" from "CI runs them".

🤖 Generated with Claude Code

AGENTS.md claimed docs/api was Dokka output committed to the repo. It has
been git ignored since 5abae5d ("Prepare 2.9 release", April 2022), which
untracked every docs/api file and added the directory to .gitignore in the
same commit. Both release guides already have this right: they run
`rm -rf docs/api && ./gradlew siteDokka` before `mkdocs gh-deploy` precisely
because the directory isn't there.

That line sent me looking for a directory to regenerate after a public API
change in #2938, which is the exact failure this file exists to prevent.

Moved out of "Things that will bite you" and onto the siteDokka command,
next to updateKotlinAbi. Nothing about a generated, ignored directory is
surprising once stated, so it isn't a bite; the useful moment for the fact
is when you've just changed the public API and are deciding what to
regenerate. Kept the half of the warning that still holds — fix the KDoc,
not the generated pages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pyricau
pyricau merged commit c36feeb into main Aug 5, 2026
13 checks passed
@pyricau
pyricau deleted the fix-the-agents-md-claim-that-d branch August 5, 2026 08:12
dayanruben pushed a commit to dayanruben/leakcanary that referenced this pull request Aug 6, 2026
`main` is deliberately unprotected, so it has no required status checks.
Auto-merge is enabled at the repo level, which makes `gh pr merge --auto`
look like the way to land a PR once CI passes, but with nothing to gate on
GitHub merges on the spot — exiting zero and printing nothing, so it reads
exactly like it armed. I merged square#2940 that way with eleven emulator jobs
still pending.

Leaving `main` open is deliberate and worth keeping, so the fix is to
document the wait that actually works rather than to protect the branch:
`gh pr checks --watch --fail-fast && gh pr merge`, started detached because
a run takes 9 to 13 minutes and a ten minute foreground timeout lands right
before the last emulator reports.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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