fix: reference System.Security.Cryptography.Primitives when building the Roslyn worker - #2070
Merged
Merged
Conversation
…oslyn worker Without this assembly, rebuilding the shared worker fails with CS0012 on HashAlgorithmName from the CodeAnalysis Emit API, which surfaces as an Unhandled log and fails WatchExpressionCompilerTests in full EditMode runs. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe worker reference builder now conditionally includes ChangesCryptography reference support
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 |
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
HashAlgorithmNamewhen the Unity NetCoreRuntime shipsSystem.Security.Cryptography.Primitives.dll.WatchExpressionCompilerTestsduring EditMode runs after other tests shut down the shared worker.Root cause
Rebuilding the shared worker compiles
RoslynCompilerWorker.csagainst Microsoft.CodeAnalysis. TheEmitAPI surface requiresHashAlgorithmNamefromSystem.Security.Cryptography.Primitives, butBuildWorkerReferenceSetdid not reference that assembly. AfterExternalCompilerPathResolverTestsdeleted the worker DLL / cleared health-monitor once-flags, Watch expression compilation rebuilt the worker, hit CS0012, andReportSharedWorkerFailureemittedDebug.LogError.Test plan
uloop compile→ 0 errors / 0 warnings$TMPDIR/UnityCliLoopCompilation/RoslynWorker-<pid>/, then EditMode regexExternalCompilerPathResolverTests|WatchExpressionCompilerTests→ 18/18 passed (pre-fix: 1 failure on ValidExpression)System.Security.Cryptography.Primitives.dllworker_build_failedfrom path-resolver fallback smoke)BuildWorkerReferenceSet_WhenPrimitivesAssemblyExists_ShouldIncludePrimitivesReference→ passed