Skip to content

Conversation

@jaredpar
Copy link
Member

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 into main and then backport to release/7.0 in order to get source build clean.

cston and others added 2 commits September 30, 2022 10:20
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.
@ghost
Copy link

ghost commented Sep 30, 2022

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.

@ghost ghost assigned jaredpar Sep 30, 2022
dotnet/roslyn#64294

Compiler now issues warnings for pointer operations involving managed
types
@jkotas jkotas changed the title Update to latest .NET 7 Rosyln compiler Update to latest .NET 7 Roslyn compiler Sep 30, 2022
@jaredpar
Copy link
Member Author

/backport to release/7.0

@github-actions
Copy link
Contributor

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3161810428

@github-actions
Copy link
Contributor

@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 128

Please backport manually!

@ghost
Copy link

ghost commented Sep 30, 2022

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

Issue Details

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 into main and then backport to release/7.0 in order to get source build clean.

Author: jaredpar
Assignees: jaredpar
Labels:

area-Meta

Milestone: -

@jaredpar
Copy link
Member Author

jaredpar commented Oct 3, 2022

@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>
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member Author

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.

@jaredpar jaredpar merged commit b1fbe69 into dotnet:main Oct 3, 2022
@jaredpar jaredpar deleted the sb-main branch October 3, 2022 20:28
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 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.

4 participants