Skip to content
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

Delete NS2x runtime specific impls #64610

Merged
merged 2 commits into from
Feb 1, 2022

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Feb 1, 2022

Fixes #64536

Remove the remaining ten .NETStandard runtime specific implementations.
For reasoning please see #64536.

@ericstj I'm unsure if I got it right. Some of the NS2.x implementations will now throw a PNSE. Is that expected and OK? All the project changes are contained in the first commit. The second commit removes the infrastructure burden.

Remove the remaining ten .NETStandard runtime specific implementations.
For reasoning please see dotnet#64536.
@ghost
Copy link

ghost commented Feb 1, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #64536

Remove the remaining ten .NETStandard runtime specific implementations.
For reasoning please see #64536.

@ericstj I'm unsure if I got it right. Some of the NS2.x implementations will now throw a PNSE. Is that expected and OK? All the project changes are contained in the first commit. The second commit removes the infrastructure burden.

Author: ViktorHofer
Assignees: ViktorHofer
Labels:

area-Infrastructure-libraries

Milestone: 7.0.0

ViktorHofer added a commit to dotnet/arcade that referenced this pull request Feb 1, 2022
dotnet/runtime was the only consumer that dependent on runtime specific .NETStandard tfms. Now that we are removing them with dotnet/runtime#64610 we can also delete the hacks to make them work in the TargetFramework SDK.
@ViktorHofer ViktorHofer force-pushed the DeleteNS2xRuntimeSpecificImpls branch 3 times, most recently from a8901c7 to 691ce83 Compare February 1, 2022 14:10
Also cleaning-up some logic and stop disabling AppendTargetFramework.
ViktorHofer added a commit to dotnet/arcade that referenced this pull request Feb 1, 2022
dotnet/runtime was the only consumer that dependent on runtime specific
.NETStandard tfms. Now that we are removing them with
dotnet/runtime#64610 we can also delete the
hacks to make them work in the TargetFramework package.

Also renaming the project from
Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk to
Microsoft.DotNet.Build.Tasks.TargetFramework as doesn't need to be an
msbuild sdk anymore and consuming it as a package will reduce evaluation
time.
@ericstj
Copy link
Member

ericstj commented Feb 1, 2022

Some of the NS2.x implementations will now throw a PNSE. Is that expected and OK?

So long as that's what they did before this change that is OK. We don't want to transition any netstandard implementation from real to PNSE without first considering all scenarios. I don't see any of those transitions here so it seems OK.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Feb 1, 2022

Thanks for double checking. Then the change is ready to be reviewed. I believe the test leg failures are all unrelated but let me retrigger CI to be sure.

@ViktorHofer
Copy link
Member Author

/azp run runtime-staging

@ViktorHofer
Copy link
Member Author

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ViktorHofer
Copy link
Member Author

/azp run dotnet-linker-tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through everything and it looked reasonable.

@@ -20,7 +20,7 @@

<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">$(NetCoreAppToolCurrent)</_generateRuntimeGraphTargetFramework>
<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_generateRuntimeGraphTargetFramework>
<_generateRuntimeGraphTask>$([MSBuild]::NormalizePath('$(BaseOutputPath)', '$(_generateRuntimeGraphTargetFramework)-$(Configuration)', '$(AssemblyName).dll'))</_generateRuntimeGraphTask>
<_generateRuntimeGraphTask>$([MSBuild]::NormalizePath('$(BaseOutputPath)', $(Configuration), '$(_generateRuntimeGraphTargetFramework)', '$(AssemblyName).dll'))</_generateRuntimeGraphTask>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this related to the rest of the change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I change the IntermediateOutputPath and the OutputPath by removing the AppendTargetFrameworkToOutputPath=false setting in the libraries Directory.Build.props file, hence a few hardcoded paths need to be updated.

<AppleTestRunnerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleTestRunner', '$(MobileRunnersDirSuffix)'))</AppleTestRunnerDir>
<AndroidTestRunnerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidTestRunner', '$(MobileRunnersDirSuffix)'))</AndroidTestRunnerDir>
<WasmTestRunnerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmTestRunner', '$(MobileRunnersDirSuffix)'))</WasmTestRunnerDir>
<AppleTestRunnerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleTestRunner', '$(Configuration)', '$(NetCoreAppCurrent)'))</AppleTestRunnerDir>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this related to the rest of the change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reason as above. The IntermediateOutputPath and the OutputPath of the test runners changed with the removal of the AppendTargetFrameworkToOutputPath=false setting and I'm updating hardcoded paths here.

@@ -92,6 +92,3 @@ In order to mitigate design-time/build-time performance issues with source gener
<DisableSourceGeneratorPropertyName>CustomPropertyName</DisableSourceGeneratorPropertyName>
</PropertyGroup>
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add something to the docs around where the -runtime suffix is supported? Does the infra fail in a sensible way when it's misused (if not, should we explicitly error)?

Copy link
Member Author

@ViktorHofer ViktorHofer Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After dotnet/arcade#8418 merged and consumed, NuGet will throw during restore if a non .NETCoreApp tfm has a suffix in its alias. It makes sense to add section to the project guidelines clarifying which tfms can be runtime specific and how to apply conditions to specific runtimes correctly.

I plan to update that document with #64500.

@ViktorHofer
Copy link
Member Author

The wasm failures are affecting all PRs. Merging.

@ViktorHofer ViktorHofer merged commit ef5803d into dotnet:main Feb 1, 2022
@ViktorHofer ViktorHofer deleted the DeleteNS2xRuntimeSpecificImpls branch February 1, 2022 21:51
ViktorHofer added a commit to dotnet/arcade that referenced this pull request Feb 1, 2022
dotnet/runtime was the only consumer that dependent on runtime specific
.NETStandard tfms. Now that we are removing them with
dotnet/runtime#64610 we can also delete the
hacks to make them work in the TargetFramework package.

Also renaming the project from
Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk to
Microsoft.DotNet.Build.Tasks.TargetFramework as doesn't need to be an
msbuild sdk anymore and consuming it as a package will reduce evaluation
time.
Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost ghost locked as resolved and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supporting netstandard2.x platform specific target frameworks is causing unreasonable pain
3 participants