Skip to content

Backport pr 111723 to 8.0 staging #112319

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

Closed

Conversation

StephenMolloy
Copy link
Member

Backport of #111723 to release/8.0-staging

Customer Impact

  • Customer reported
  • Found internally

Fixes #107252, #108432. A customer reported a couple of inconsistent behaviors between the usual ILGen-based XmlSerializer and the reflection-based XmlSerializer that they got switched over to because iOS projects don't support dynamic code by default. This PR addresses the null-vs-empty collections issue as well as the sub-types as collection items issue. A third issue regarding xml/type-mapping of hidden/overridden members that was included in the .Net 10 PR is not part of this backport since it touches code that the standard ILGen serializer also uses and we did not want to introduce any risk there.

Regression

  • Yes
  • No

Testing

Several tests were added to explore the reported scenarios exactly as well as some tangential exploration.

Risk

Low - These changes affect the reflection-based serializer only. We already know the reflection-based serializer is not yet up to parity with the ILGen serializer, but it is only used as a fallback in a minority of cases. The scenarios being changed here have had several tests added to explore potential impacts and ensure our changes are only doing what we intend.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

matouskozak and others added 30 commits June 21, 2024 07:29
* Update dotnet-pgo.md

Updates the instructions on how to install and use dotnet-pgo.

* Update docs/design/features/dotnet-pgo.md

---------

Co-authored-by: Steve Pfister <steveisok@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…narrow non-breaking space characters (dotnet#103647)

* Backport of dotnet#103226 to release/8.0-staging
….Reflection (dotnet#103726)

Implements the API proposal detailed and approved in issue dotnet#101616. This new API will allow developers to change the entry assembly of their .NET apps on the fly, should they require it. One important scenario is app launchers. With the usage of this API, then functions like `GetEntryAssembly()` will return the right value, and thus we will be able to ensure the information is consistent and correct.
…otnet#103817)

Customers who want to create native static or shared libraries (aka library mode) for nativeaot targeting ios and android were blocked by an msbuild check in the mono workload target. This check assumes if you set the NativeLib property that you want mono's version of library mode and it will error out telling you to install a specific workload.

The fix adds an additional check for PublishAot != 'true' to prevent the error message from appearing when the customer wants nativeaot.
* Update dependencies from https://github.com/dotnet/emsdk build 20240613.2

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24313.2

* Update dependencies from https://github.com/dotnet/emsdk build 20240615.1

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24315.1

* Update dependencies from https://github.com/dotnet/emsdk build 20240615.3

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24315.3

* Update dependencies from https://github.com/dotnet/emsdk build 20240617.3

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24317.3

* Update dependencies from https://github.com/dotnet/emsdk build 20240624.2

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24324.2

* Update dependencies from https://github.com/dotnet/emsdk build 20240702.3

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24313.1 -> To Version 8.0.7-servicing.24352.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Fix missing substitution (dotnet#103287)

* Update dependencies from https://github.com/dotnet/emsdk build 2024061.3 (dotnet#103291)

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24277.3 -> To Version 8.0.7-servicing.24310.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* [release/8.0] Update dependencies from dotnet/emsdk (dotnet#103388)

* Update dependencies from https://github.com/dotnet/emsdk build 20240612.2

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24310.3 -> To Version 8.0.7-servicing.24312.2

* Update dependencies from https://github.com/dotnet/emsdk build 20240612.2

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24310.3 -> To Version 8.0.7-servicing.24312.2

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update dependencies from https://github.com/dotnet/emsdk build 20240613.1 (dotnet#103426)

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24312.2 -> To Version 8.0.7-servicing.24313.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* update ESRP Code Signing

---------

Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…dotnet#103578)

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20240617.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.24271.1 -> To Version 8.0.0-alpha.0.24317.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20240624.2

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.24271.1 -> To Version 8.0.0-alpha.0.24324.2

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…03.2 (dotnet#104378)

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24277.3 -> To Version 8.0.8-servicing.24353.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
…-merge-8.0-2024-07-09-1037-610d89c1-474d-49e2-bee3-46db79c7a14d
…ion changes in cases involving a lot of sync-over-async (dotnet#103984)

* [8.0] Add a config flag to experiment with some work item prioritization changes in cases involving a lot of sync-over-async

Some services that use a lot of sync-over-async were seen to experience stalls due to some priority inversion issues in work items that get queued to the thread pool. For instance, a work item W1 queues another work item W2 to the global queue and blocks waiting for a task to complete, where W2 would need to run in order to complete the task, but W2 is queued behind a number of other work items that operate like W1, and this sometimes leads to long-duration stalls. This change adds an experimental config option that when enabled, enqueues some kinds of work items to a new low-priority global queue that is checked after all other global queues. This was seen to help in some cases.
…8.0-2024-07-09-1037-610d89c1-474d-49e2-bee3-46db79c7a14d

Merging internal commits for release/8.0
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
dotnet#104711)

* Use latest .NET version in HttpStress runs

* Revert sdk image changes

* Apply to sslstress as well
Add missing delegating/override method in TlsStream

Testing: I have validated that after those changes my local reproduction was no longer hitting this failure.
….5 (dotnet#104744)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.24266.3 -> To Version 8.0.0-beta.24360.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…08.2 (dotnet#104630)

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.7-servicing.24352.3 -> To Version 8.0.8-servicing.24358.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
….5 (dotnet#104743)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.24266.3 -> To Version 8.0.0-beta.24360.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
"Port" the changes from dotnet#103788 to .NET 8.

We don't have the DFS tree, so enhance the topological sort that SSA uses
to detect cycles and backedges.

Use this info to stop searching for redundant zero inits once flow from
entry has entered a cycle.

Fixes dotnet#103477 (for .NET 8).
vseanreesermsft and others added 20 commits January 14, 2025 10:48
…websites.net (dotnet#111401)

* Disable more tests dependent on http://corefx-net-http11.azurewebsites.net (dotnet#111354)

* Disable more tests dependent on http://corefx-net-http11.azurewebsites.net

* Disable winhttphandlertests

* Disable tests using http://corefx-net-http11.azurewebsites.net (dotnet#111235)

Disabling until HTTPS redirection can be turned off at the server.

* Fix build

* another attempt to fix build

* Fix build
…8.0-2025-01-14-1047

Merging internal commits for release/8.0
…21.1 (dotnet#111712)

Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100
 From Version 8.0.12-servicing.24569.2 -> To Version 8.0.13-servicing.25071.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…ease/8.0-staging

[automated] Merge branch 'release/8.0' => 'release/8.0-staging'
…NO-MERGE` label is applied (dotnet#111962)

* Add workflow to prevent merging a PR when the `NO-MERGE` label is applied.

* Invert condition

* Fix backtick bug in check-service-labels echo.

---------

Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
* Add missing .alt_entry to CoreCLR *_FakeProlog methods

* Use .alt_entry on Apple platforms

* Remove explicit __compact_unwind entries from x64 assembler
…ference-packages (dotnet#111605)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250117.1

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 8.0.0-alpha.1.25060.2 -> To Version 8.0.0-alpha.1.25067.1

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250131.5

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 8.0.0-alpha.1.25060.2 -> To Version 8.0.0-alpha.1.25081.5

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…50114.4 (dotnet#111411)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.24510.2 -> To Version 8.0.0-prerelease.25064.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…110.1 (dotnet#111412)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.24516.1 -> To Version 8.0.0-beta.25060.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#111445)

* Update dependencies from https://github.com/dotnet/runtime-assets build 20250114.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.24517.1 -> To Version 8.0.0-beta.25064.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20250121.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.24517.1 -> To Version 8.0.0-beta.25071.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@StephenMolloy StephenMolloy added this to the 8.0.x milestone Feb 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet