feat: Add compile-error-based detection groundwork for third-party tool migration#1952
Merged
hatayama merged 2 commits intoJul 22, 2026
Conversation
…-scan The migration wizard's auto-scan currently must text-scan all of Assets to decide whether a V2-to-V3 migration is needed. Since V2 API usage always produces a compile error after the upgrade, this adds a zero-scan detection shortcut instead (mirrors how Unity's own API Updater uses "(UnityUpgradable" message matching): a boundary-matched token set derived from ThirdPartyToolMigrationRuleCatalog's legacy/current name pairs, and a matcher that filters/dedups compile-error log entries down to migration target file paths. Wiring this into the actual startup/console-log path is a later PR.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds legacy API token detection derived from replacement rules and identifier boundaries, introduces compile-error matching with deduplicated target paths, and adds NUnit coverage for detection, filtering, deduplication, mixed entries, empty results, and null inputs. ChangesThird-party tool migration detection
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CompileErrorEntries
participant ThirdPartyToolMigrationCompileErrorLogMatcher
participant ThirdPartyToolMigrationDetectionRules
CompileErrorEntries->>ThirdPartyToolMigrationCompileErrorLogMatcher: Match(entries)
ThirdPartyToolMigrationCompileErrorLogMatcher->>ThirdPartyToolMigrationDetectionRules: Check each error message
ThirdPartyToolMigrationDetectionRules-->>ThirdPartyToolMigrationCompileErrorLogMatcher: Legacy-token match result
ThirdPartyToolMigrationCompileErrorLogMatcher-->>CompileErrorEntries: Matched entries and deduplicated file paths
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Advisor review flagged this as worth a comment: CustomToolManager isn't in ToolContractTypeReplacementRules, so it wasn't picked up by the token derivation. It's safe to omit because every V2 file referencing it also carries a legacy-namespace reference, which already yields a match.
hatayama
merged commit Jul 22, 2026
2822b27
into
feature/migration-error-driven-autoscan-integration
2 checks passed
This was referenced Jul 22, 2026
Merged
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
User Impact
Changes
ThirdPartyToolMigrationDetectionRules: adds a legacy-API token set derived fromThirdPartyToolMigrationRuleCatalog's existing legacy/current name pairs (excluding names that are unchanged between V2 and V3, to avoid false-matching unrelated V3 compile errors), and a boundary-awareContainsLegacyApiTokencheck so a token likeIUnityTooldoes not match inside an unrelated identifier such asIUnityToolbarButton.ThirdPartyToolMigrationCompileErrorLogMatcher(new): given a list of compile-error log entries (message, file path, line number), filters to the entries whose message contains a legacy API token and returns the deduplicated set of target file paths. Parsing file/line out of raw console log text is left to the caller that wires this to the real log source.Verification
uloop compile: 0 errors, 0 warningsuloop run-tests(new tests only, regex filter): 12/12 passeduloop run-tests(full EditMode suite): 2309/2322 passed; the 6 failures are pre-existing and unrelated to this change (dispatcher version-pin string drift, a PausePointInitializeOnLoadownership check, a Mouse UI GameObject leftover state, a schemaDescriptionAttributecheck, and a flaky watch-expression compile timing test) — none touchThirdPartyToolMigrationcode.