feat: Speed up custom-tool migration scans by limiting them to affected assemblies#1953
Conversation
Scope migration-plan construction to only the assemblies containing seed files, instead of always walking the whole Assets tree. This is the second building block for compile-error-driven migration detection: once a legacy-API compile error identifies which files need migrating (PR-1), the plan builder should only re-scan the assemblies those files belong to. - ThirdPartyToolMigrationScanScopeResolver: resolves seed file paths to their deduplicated set of assembly directories via FindNearestAssemblyDirectory. - ProjectFileInventory.CreateFromDirectoriesAsync: walks only the given scope directories instead of Assets/, sharing the directory-walk logic with the existing full-scan CreateAsync via an extracted WalkDirectoryTreeAsync helper (no behavior change to the full scan). - ThirdPartyToolMigrationPlanBuilder.CreateInScopeAsync and ThirdPartyToolMigrationFileService.PreviewMigrationInScopeAsync: distinctly-named scope-limited counterparts to the existing Create/CreateAsync and PreviewMigration(Async) methods (no overloading, per repo convention). The scoped preview intentionally bypasses the full-scan preview/plan cache, since a partial-scope plan must never be mistaken for the full plan that ApplyMigration relies on.
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
✨ Finishing Touches🧪 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 |
ResolveScopeAssemblyDirectories returned FindNearestAssemblyDirectory's synthetic implicit-assembly marker path (e.g. __UnityCliLoopImplicitEditorAssembly) as-is for seed files with no real asmdef/asmref ancestor. That marker never exists on disk, and CreateFromDirectoriesAsync skips scope directories that don't exist, so a legacy tool living directly under an implicit assembly (no asmdef, e.g. Assets/Editor/) would silently disappear from the scoped scan and be misreported as "no migration needed". ResolveScopeAssemblyDirectories now excludes implicit-assembly markers from the returned directory list and instead reports HasImplicitAssemblySeeds, so a caller can fall back to a full scan instead of silently dropping those seeds.
20452f7
into
feature/migration-error-driven-autoscan-integration
Summary
User Impact
Changes
ThirdPartyToolMigrationScanScopeResolver(new): resolves a set of seed file paths to their deduplicated assembly directories, reusing the existingFindNearestAssemblyDirectoryresolution used by the full scan.ProjectFileInventory.CreateFromDirectoriesAsync(new): walks only the given scope directories instead of the wholeAssetstree. Shares its directory-walk logic with the existing full-scanCreateAsyncvia an extractedWalkDirectoryTreeAsynchelper — the full scan's behavior is unchanged.ThirdPartyToolMigrationPlanBuilder.CreateInScopeAsync/ThirdPartyToolMigrationFileService.PreviewMigrationInScopeAsync(new): distinctly-named scope-limited counterparts to the existingCreate/CreateAsync/PreviewMigration(Async)methods (the repo forbids method overloading). The scoped preview intentionally does not read or write the existing full-scan preview/plan cache, since a partial-scope plan must never be mistaken for the full plan thatApplyMigrationrelies on.Verification
uloop compile: 0 errors, 0 warningsuloop run-tests(new + related tests, regex filter): 12/12 passeduloop run-tests(allThirdPartyToolMigration*tests): 438/438 passed (4 skipped, platform-specific)uloop run-tests(full EditMode suite): 2309/2320 passed; the 4 failures are pre-existing and unrelated to this change (dispatcher version-pin string drift, a schemaDescriptionAttributecheck, a startup-hook ownership check) — none touchThirdPartyToolMigrationcode.