Repository navigation
fix: harden wizard input validation and make generation atomic - #37
Merged
Merged
Conversation
- Reject Kotlin/Java keywords as package segments and feature/field names; the package proposed from the project name is always valid. - Android Studio: normalize feature/field names and fail generation with a notification naming the field when a name can't become an identifier. - Escape quotes, backslashes and `$` in the test value. - Trim stray spaces in the package name. - Roll back a failed generation (remove written files, restore replaced ones); in Android Studio replace default files only after rendering. - Run the post-sync apiDump at most once. - Ship RENAMES.txt alongside SUBSTITUTIONS.txt so tests catch drift in the dotfile rename tables; make KMPLicense's tri-state mapping unit-testable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Fixes from a review pass. User-facing changes are in
CHANGELOG.mdunder## Unreleased → Fixed:My Feature→my_feature). A name that can't become an identifier stops generation with a notification that names the field, instead of reporting success.$in the test value are escaped in the generated tests.apiDump: the post-syncapiDumpruns at most once, even when two sync events arrive together.Internal:
generateTemplatesnow also writesRENAMES.txt(the forward dotfile rename table), and a test asserts thatRESTORED_FILE_NAMESreverses every entry.KMPLicense.isLicensed()delegates to an injectablelicenseState(...)so its tri-state mapping can be unit-tested. A new expired-license.p12test fixture was added.Test plan
./gradlew test: new and updated tests for validation, staged generation and rollback, Studio scaffold, license state, substitution and rename symmetry, andapiDumplistener once-only behavior./gradlew verifyPlugin: Compatible with IU-261/262/263 and Android Studio 261/262🤖 Generated with Claude Code