Info warnings noise produced by LibraryImport generator
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Repro
`dotnet build src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj /v:diag > log.txt`
### Result
A lot of info warnings produced by LibraryImport generator in the log.txt
```
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeModuleBuilder.cs(116,116): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeModuleBuilder.cs(159,85): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeModuleBuilder.cs(168,118): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeModuleBuilder.cs(174,98): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(69,104): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(73,95): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(76,103): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(81,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(82,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(84,33): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(85,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(100,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(120,80): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(538,98): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs(542,99): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs(1776,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Interop.Calendar.cs(13,82): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CreateWellKnownSid.cs(18,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CreateWellKnownSid.cs(19,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumKeyEx.cs(21,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumKeyEx.cs(23,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumKeyEx.cs(24,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumValue.cs(23,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumValue.cs(24,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegEnumValue.cs(25,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegQueryValueEx.cs(19,20): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegQueryValueEx.cs(21,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegSetValueEx.cs(21,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.RegSetValueEx.cs(30,21): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
C:\runtime\src\libraries\Common\src\Interop\Windows\OleAut32\Interop.SysAllocStringByteLen.cs(12,70): info SYSLIB1092: The usage of 'LibraryImportAttribute' does not follow recommendations. It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. (TaskId:230)
```
We should either fix them or disable this warning code for dotnet/runtime.
Contributor guide
Assessment
This issue has not been assessed yet.