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

Allow unnecessary [In, Out] attributes on blittable arrays and report them as unnecessary #87774

Merged
merged 10 commits into from
Jun 27, 2023

Conversation

jkoritzinsky
Copy link
Member

Instead of blocking unnecessary [In, Out] attributes on members where they aren't required to specify the behavior in that case, allow them and report a diagnostic that they're unnecessary. This diagnostic will fade-out the attributes and specify that they aren't required to get the expected behavior. We'll only do this on use cases where the attributes could be valid/required to get the desired behavior.

Depends on #87700

@jkoritzinsky jkoritzinsky added area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature labels Jun 19, 2023
@ghost
Copy link

ghost commented Jun 19, 2023

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

Issue Details

Instead of blocking unnecessary [In, Out] attributes on members where they aren't required to specify the behavior in that case, allow them and report a diagnostic that they're unnecessary. This diagnostic will fade-out the attributes and specify that they aren't required to get the expected behavior. We'll only do this on use cases where the attributes could be valid/required to get the desired behavior.

Depends on #87700

Author: jkoritzinsky
Assignees: -
Labels:

area-System.Runtime.InteropServices, source-generator

Milestone: -

@jkoritzinsky jkoritzinsky merged commit 6d6fbe0 into dotnet:main Jun 27, 2023
169 of 174 checks passed
@jkoritzinsky jkoritzinsky deleted the byval-marshal-unnecessary branch June 27, 2023 02:35
@ghost ghost locked as resolved and limited conversation to collaborators Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants