Skip to content

[Multithreaded] Migrate RunReadyToRunCompiler#55339

Draft
AlesProkop wants to merge 1 commit into
dotnet:mainfrom
AlesProkop:migrate-run-ready-to-run-compiler-task
Draft

[Multithreaded] Migrate RunReadyToRunCompiler#55339
AlesProkop wants to merge 1 commit into
dotnet:mainfrom
AlesProkop:migrate-run-ready-to-run-compiler-task

Conversation

@AlesProkop

Copy link
Copy Markdown
Member

Related to dotnet/msbuild#13073

Context

RunReadyToRunCompiler used process-global state when resolving tool, input, and output paths. The task needs per-project path and process environment handling before it can execute safely as a multithreaded MSBuild task.

Changes Made

  • Added MSBuildMultiThreadableTask and IMultiThreadableTask support with a TaskEnvironment.Fallback default.
  • Absolutized filesystem and executable paths through TaskEnvironment while preserving original values in diagnostics and compiler arguments.
  • Added a .NET Framework ToolTask.GetProcessStartInfo compatibility override to apply the task-local working directory and environment.
  • Added focused multithreading tests for independent project-directory resolution and empty tool-path diagnostics.

Testing

  • Built Microsoft.NET.Build.Tasks.csproj for net11.0 successfully.
  • Built Microsoft.NET.Build.Tasks.csproj for net472 successfully.
  • Added and ran focused tests in GivenARunReadyToRunCompilerMultiThreading:
    • RelativePathsResolveIndependentlyForEachTask verifies relative paths resolve against each task instance's project directory.
    • EmptyToolPathUsesExistingValidationDiagnostic verifies empty paths retain the existing validation failure behavior.
    • Result: 2 passed, 0 failed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant