Repository navigation
Import types instead of writing them out in full, and make the check blocking - #260
Merged
Merged
Conversation
The output of python scripts/check_java_imports.py --fix: 280 names in 77 files, shortened, with their imports added. No other change. Long names that would clash with another type of the same name are left as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tree is clean after the --fix commit, so the static-checks step no longer continues on error. The pre-commit hook runs it whenever Java is staged, over the whole tree, because whether a long name is needed depends on the other classes in its package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parawanderer
had a problem deploying
to
Android Build
October 13, 2026 13:32 — with
GitHub Actions
Failure
parawanderer
had a problem deploying
to
Android Build
October 13, 2026 13:32 — with
GitHub Actions
Failure
GoogleMapProvider implements IMapProvider, which nests its own CameraPosition. Inside the class body an inherited member type beats a single-type import, so --fix shortened Google's CameraPosition into the interface's and the build failed. The check now collects types nested in the project's own supertypes, transitively, and treats them as a clash. Supertypes outside the scanned sources are still invisible to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Follow-up to #256, now that the PRs it was waiting on are merged.
python scripts/check_java_imports.py --fixoverapp/src. 280 names in 77 files are shortened and their imports added. Nothing else changed. Names that would clash with another type of the same name keep their long form.continue-on-errorfrom thestatic-checks.ymlstep, and runs the check in.githooks/pre-commitwhenever Java is staged. The hook scans the whole tree, because whether a long name is needed depends on the other classes in its package. CONTRIBUTING and AGENTS.md describe both.Verified: a re-check after
--fixreports nothing. The added imports include noandroid.Rand no file imports two types with the same short name.Not verified locally: compilation. No Android toolchain here; this PR's build and emulator run are what check that the shortened names still resolve.
🤖 Generated with Claude Code