-
Notifications
You must be signed in to change notification settings - Fork 127
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
PublishTrimmed should use a linker that matches the TargetFramework #3029
Comments
The current plan is to add an implicit We could take the version of the The As for the behavior when targeting |
I think it makes sense to keep 7.0 as-is, unless we get lot of feedback otherwise. |
Leaving a note for once this is finalized to check on the linker benchmark in dotnet/performance and make sure that the benchmark will still use the latest version of the linker. |
Part of dotnet/linker#3029. With https://github.com/dotnet/sdk/pull/29441/files, this will enable the SDK to use a different version of illink depending on the TFM. The latest 7.0 illink package is used when trimming net7.0 and earlier, which matches the configuration we shipped in the .NET 7 SDK. - The 7.0 version is taken from the latest 7.0 SDK branch: https://github.com/dotnet/sdk/blob/release/7.0.2xx/eng/Versions.props#L89. - The 8.0 version is the latest in the SDK's main branch: https://github.com/dotnet/sdk/blob/main/eng/Versions.props#L88 These versions will quickly get out of date and need to be kept updated. For the latest (8.0) version it would be possible to set up dependency flow from linker -> installer to automate this, but this will not be necessary after the linker move to dotnet/runtime, which will allow us to use $(MicrosoftNETCoreAppRuntimePackageVersion) for the latest illink pack. Unfortunately the 7.0 version will still need manual updates. We might want to consider changing our version numbers to match dotnet/runtime, but AFAIK that will still be a manual process (to update the patch number in the release/7.0 branch of dotnet/linker every SDK servicing release).
…5106) Part of dotnet/linker#3029. With https://github.com/dotnet/sdk/pull/29441/files, this will enable the SDK to use a different version of illink depending on the TFM. The latest 7.0 illink package is used when trimming net7.0 and earlier, which matches the configuration we shipped in the .NET 7 SDK. - The 7.0 version is taken from the latest 7.0 SDK branch: https://github.com/dotnet/sdk/blob/release/7.0.2xx/eng/Versions.props#L89. - The 8.0 version is the latest in the SDK's main branch: https://github.com/dotnet/sdk/blob/main/eng/Versions.props#L88 These versions will quickly get out of date and need to be kept updated. For the latest (8.0) version it would be possible to set up dependency flow from linker -> installer to automate this, but this will not be necessary after the linker move to dotnet/runtime, which will allow us to use $(MicrosoftNETCoreAppRuntimePackageVersion) for the latest illink pack. Unfortunately the 7.0 version will still need manual updates. We might want to consider changing our version numbers to match dotnet/runtime, but AFAIK that will still be a manual process (to update the patch number in the release/7.0 branch of dotnet/linker every SDK servicing release). Original commit: dotnet/installer@fe452cf [[ commit created by automation ]]
We need a long-term solution for back-compat issues when using a newer SDK to trim apps targeting older TFMs. Some issues encountered so far:
We will hit a similar situation with planned breaking changes in 8.0, where it would be difficult to maintain a back-compat path. Maybe there are more examples, but this one comes to mind:
The solution will most likely (pending the outcome of broader discussion) be to use the 6.0 linker when targeting .net6, etc. This issue tracks the technical side of that proposed solution.
The text was updated successfully, but these errors were encountered: