fix: Migration handles deeply nested Windows project files#1396
Conversation
Route third-party migration reads and writes through extended-length Windows paths so preview and apply do not fail on MAX_PATH-sized project files. Add Windows-only regression coverage for long-path preview and apply flows.
Use the migration long-path file access wrapper for cached plan fingerprint metadata and content hashes so edits to long-path source files invalidate preview plans correctly. Add Windows-only regression coverage for long-path discovery and fingerprint changes.
📝 WalkthroughWalkthroughIntroduces an internal ChangesWindows Long-Path File Access Abstraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs (1)
75-230: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a long-path asmdef/asmref regression too.
These cases lock in long-path
.csreads/writes and fingerprinting, but they still leave the assembly-definition/reference discovery path unguarded. A Windows-only long-path.asmdef/.asmrefscenario would catch regressions in the remaining migration traversal surface called out in the PR summary.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs` around lines 75 - 230, Add a Windows-only long-path regression test for assembly-definition/reference discovery in ThirdPartyToolMigrationFileServiceTests. Mirror the existing long-path setup used by ThirdPartyToolMigrationSourceFileCache and ApplyMigrationAsync, but create a deeply nested .asmdef or .asmref under the long path and verify the migration traversal still finds it and includes it in the result. Use the existing helpers like CreateLongDirectoryPath, ToWindowsExtendedLengthPath, and the ThirdPartyToolMigrationFileService/ProjectFileInventory flow so the new test covers the remaining unguarded long-path surface.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs`:
- Around line 75-230: Add a Windows-only long-path regression test for
assembly-definition/reference discovery in
ThirdPartyToolMigrationFileServiceTests. Mirror the existing long-path setup
used by ThirdPartyToolMigrationSourceFileCache and ApplyMigrationAsync, but
create a deeply nested .asmdef or .asmref under the long path and verify the
migration traversal still finds it and includes it in the result. Use the
existing helpers like CreateLongDirectoryPath, ToWindowsExtendedLengthPath, and
the ThirdPartyToolMigrationFileService/ProjectFileInventory flow so the new test
covers the remaining unguarded long-path surface.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 44080ed4-cb14-42fc-83dc-86e3aa3b7f3c
📒 Files selected for processing (14)
Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationAsmdefMetaGuidReader.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationAsmdefMigrationRequirementResolver.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationAssemblyReferenceResolver.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationAssemblyUsageAnalyzer.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFastAssemblyRequirementCollector.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFastSourceTargetDetector.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileServiceConstants.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileWriter.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationModels.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationPlanBuilder.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationPreflightScanner.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationSourceFileCache.csPackages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationTargetScanner.cs
Summary
User Impact
Changes
Verification