[ci-fix] Needs review: fix CS0246 InvalidCSharp build break in ByRefLike/Validate under minifullaot (refs #128767)#131081
Conversation
…efs #128767) Validate.csproj is MonoAotIncompatible but was missing RequiresProcessIsolation, so under AllSubsets_Mono_MiniFullAot its source was pulled into the merged LoaderClassloaderGenerics runner while its InvalidCSharp.ilproj reference was excluded, producing CS0246. Mirrors the sibling ValidateNegative.csproj. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Threat detection produced a warning for this pull request output.
These changes need to be scrutinized before merge and only merged after a careful manual review.
- Detection reason:
parse_error - Review workflow run logs: https://github.com/dotnet/runtime/actions/runs/29745901100
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
|
/ba-g failure is unrelated and was fixed in main |
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Updates the ByRefLike generics loader test project configuration to avoid being included in the merged test runner when marked MonoAotIncompatible, preventing missing-build reference failures under certain AOT configurations.
Changes:
- Added
RequiresProcessIsolationto exclude the project from the merged test runner. - Documented the rationale and alignment with
ValidateNegative.csproj.
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
The threat detection results could not be parsed.
Review the workflow run logs for details.
Workflow artifact: ci-fix
Artifact kind: help
Linked KBE: #128767
Note
This is an AI/Copilot-generated best-effort fix attempt that I could not fully validate in the CI-fix environment (no mono minifullaot test toolchain / baseline build available). The reasoning is strong and mirrors an existing sibling project, but please review before merging.
Root cause (best analysis)
Under
AllSubsets_Mono_MiniFullAot_RuntimeTests, the build fails with:src/tests/Loader/classloader/generics/LoaderClassloaderGenerics.csprojis a merged test runner (<MergedWrapperProjectReference Include="*/**/*.??proj" />). Test projects that do not setRequiresProcessIsolationhave their source compiled directly into that merged assembly.ByRefLike/Validate.csprojsetsMonoAotIncompatible=true, which viasrc/tests/Directory.Build.targets(line 15) setsDisableProjectBuild=truefor the standalone project underminifullaot/llvmfullaot. Its referencedInvalidCSharp.ilprojis likewiseMonoAotIncompatibleand skipped. But becauseValidate.csprojlacksRequiresProcessIsolation, itsValidate.cs/GenericTypeSubstitution.cssources still get pulled into the mergedLoaderClassloaderGenericsassembly, whereusing InvalidCSharp;can no longer resolve the (excluded) IL assembly → CS0246.The sibling
ByRefLike/ValidateNegative.csprojalready setsRequiresProcessIsolation=truewith the comment "Needed for MonoAotIncompatible, NativeAotIncompatible, CrossGenTest" —Validate.csprojwas simply missing it.Attempted fix
Add
<RequiresProcessIsolation>true</RequiresProcessIsolation>toValidate.csproj, mirroringValidateNegative.csproj. This keeps the project out of the merged runner (in every config), so under minifullaot the whole project is cleanly excluded by the existingMonoAotIncompatiblehandling instead of leaking source into the merged assembly. This is not a test-disable — the test continues to run standalone everywhere it ran before; it was already excluded from mono full-AOT byMonoAotIncompatible.What is unverified / where I need help
minifullaotmerged-test build in this environment to confirm the CS0246 is gone and no new merge/runner issue appears.Validatedoes not also needNativeAotIncompatible/CrossGenTestlikeValidateNegative(the reported failure is minifullaot-only, so I kept the change minimal).Validation
not run because a mono minifullaot test build requires a full baseline/toolchain unavailable in this environmentEvidence
Help wanted
area-VM-meta-mono):@steveisok,@dotnet/runtimeFiled by
ci-failure-fix. Comment here or on the workflow file to suggest changes;ci-failure-scan-feedbackreads in-scope feedback daily and opens (or updates) a PR with prompt edits.