-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Recommend [In] and [Out] attributes on array parameters #91094
Recommend [In] and [Out] attributes on array parameters #91094
Conversation
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsAdds an info diagnostic for interop generators that nudges users to add [In] or [Out] attributes to arrays. Ensures only arrays are allowed to have [In] or [Out] attributes. Previously, other pinned custom collections would allow them. Separates tests related to [In] and [Out] attributes to their own files in both unit test projects. Moves some shared test utilities to shared code (ID(), GetCallerLineNumber())
|
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6004060617 |
@jtschuster backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: wip
Using index info to reconstruct a base tree...
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf
M src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf
M src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj
CONFLICT (content): Merge conflict in src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf
Auto-merging src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 wip
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! |
@jtschuster an error occurred while backporting to release/8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
…parameters (dotnet#91094) Recommend that methods with array parameters use [In] or [Out] attributes if there are none already, and the parameter is not in, ref, or out.
Fixes #90884
Adds an info diagnostic for interop generators that nudges users to add [In] or [Out] attributes to arrays.
Ensures only arrays are allowed to have [In] or [Out] attributes. Previously, other pinned custom collections would allow them.
Separates tests related to [In] and [Out] attributes to their own files in both unit test projects.
Moves some shared test utilities to shared code (ID(), GetCallerLineNumber())