fix: Shared compiler restarts no longer leak process handles - #1630
Conversation
Release the previously cached Process before starting its replacement so an idle worker exit cannot leak an operating-system handle. Add an injectable process starter and a process-free regression test that observes disposal without introducing Unity Test Runner blocking or background work.
|
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 (2)
📝 WalkthroughWalkthroughSharedRoslynCompilerWorkerSession now starts processes via an injectable delegate and disposes any previously cached process handle before replacing it. A test-only hook swaps the delegate for testing, and a new test verifies the previous process is disposed when replaced. ChangesStale process disposal
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
No issues found across 2 files
You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Summary
User Impact
Changes
Processobject's synchronousDisposedevent without waits or background work.Verification
Expected: True/But was: Falsefor the disposal observation.dist/darwin-arm64/uloop compile(0 errors, 0 warnings)SharedRoslynCompilerWorkerHostTests.StartProcessLocked_WhenReplacingCachedProcess_ShouldDisposePreviousHandle(1 passed)SharedRoslynCompilerWorkerHostTestsandStaticFacadeStateGuardTests(36 passed)git diff --check