-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WorkloadBuildTasks: fix sourcebuild #98138
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsThis avoids trying to build the target for unrelated linux/sourcebuild
|
Started a build on the internal pipeline to confirm the fix. |
`WorkloadBuildTasks` project uses source generated regex, which requires the corresponding analyzer to be used. But for net8.0, in source build the prebuilt package does not have the analyzers which causes the build to fail like: `/__w/1/s/artifacts/sb/src/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs(61,38): error CS8795: Partial method 'InstallWorkloadFromArtifacts.bandVersionRegex()' must have an implementation part because it has accessibility modifiers. [/__w/1/s/artifacts/sb/src/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj::TargetFramework=net8.0]` Since the net8.0 build for the task is needed only for the internal nuget being produced, we can skip the net8.0 build for source builds. Also, build WorkloadTest.Internal nuget only when building wasm
77fef32
to
7d59a04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the definition of internal build vs. source build?
By "internal build" I meant build on an internal pipeline. And sourcebuild is a special build done completely from source for dotnet. |
WorkloadBuildTasks
project uses source generated regex, which requiresthe corresponding analyzer to be used. But for net8.0, in source build
the prebuilt package does not have the analyzers which causes the build
to fail like:
/__w/1/s/artifacts/sb/src/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs(61,38): error CS8795: Partial method 'InstallWorkloadFromArtifacts.bandVersionRegex()' must have an implementation part because it has accessibility modifiers. [/__w/1/s/artifacts/sb/src/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj::TargetFramework=net8.0]
Since the net8.0 build for the task is needed only for the internal
nuget being produced, we can skip the net8.0 build for source builds.
Also, build WorkloadTest.Internal nuget only when building wasm.
Fixes #98130 .