-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update to latest .NET 7 Roslyn compiler #76459
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
Conversation
dotnet/roslyn#64093 This change enforced that `scoped` on a local set the escape scope to the current block where previously it was incorrectly setting to the containing method.
dotnet/roslyn#64318 This change allows anything returnable from a method to be assigned to an `out` parameter. In several places had to add `scoped` to `ref` to inform compiler they could not be captured in an `out` parameter.
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
dotnet/roslyn#64294 Compiler now issues warnings for pointer operations involving managed types
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs
Outdated
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs
Show resolved
Hide resolved
|
/backport to release/7.0 |
|
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3161810428 |
|
@jaredpar backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Patches for scoped locals
Applying: Make return and out equivalent for ref safety
Applying: Warnings on managed pointer types
Using index info to reconstruct a base tree...
A src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs deleted in HEAD and modified in Warnings on managed pointer types. Version Warnings on managed pointer types of src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Warnings on managed pointer types
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsSeveral recent changes in the Roslyn compiler required updates to the runtime code base. These changes are mostly suppressing warnings / adding
|
|
@stephentoub are we good to merge here? The OSX failure seems to be just an Azure Agent disconnecting during execution. |
| <TargetFramework>netstandard2.0</TargetFramework> | ||
| <!-- Don't add references to the netstandard platform since this is a core assembly --> | ||
| <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> | ||
| <Features>noRefSafetyRulesAttribute=true</Features> |
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 does this do?
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.
This disables the compiler emitting the [assembly: RefSafetyRules] attribute + supporting type. The core attribute types are incorrectly defined in this project and by default results in a compilation error. Given this change is being back ported to release/7.0 I opted for disabling the attribute emit vs. churning the code further. @cston and I were going to follow up with a PR in a bit that flips this off, fixes the attributes and let that play out separately.
Several recent changes in the Roslyn compiler required updates to the runtime code base. These changes are mostly suppressing warnings / adding
scoped. It's necessary to merge them intomainand then backport torelease/7.0in order to get source build clean.