-
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
Mark System.Console APIs as unsupported on Android #50931
Mark System.Console APIs as unsupported on Android #50931
Conversation
Tagging subscribers to this area: @carlossanlop Issue DetailsAnnotated public System.Console APIs throwing PNSE on Android. No changes added to ref-part b/c no warnings appeared (maybe I missed something?). Part of #47911.
|
You need to add these to the ref for them to be meaningful to anyone outside of System.Console. The purpose of the attributes is to give warnings to consumers of the API that they might be calling something that doesn't work. |
Yes, but as far as I remember there should be the analyzer warnings saying that one is missing the attribute annotations in the respective ref part. I didn't get such a warning so that's why I left the comment about ref part. Actually no issue to add it as well. |
5d87cad
to
ef531c0
Compare
@stephentoub @buyaa-n is this a bug in the analyzer? |
3755cf4
to
14f0cee
Compare
Not sure if that is a bug in ApiCompat analyzer CC @safern |
14f0cee
to
2a87a7a
Compare
Could anyone please give another review to it? |
src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
Outdated
Show resolved
Hide resolved
...braries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/AddConsoleFormatterTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/tests.proj
Outdated
@@ -23,6 +23,8 @@ | |||
<ItemGroup Condition="'$(TargetOS)' == 'Android'"> | |||
<!-- Never going to run on Android --> | |||
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj" /> | |||
|
|||
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Console\tests\TrimmingTests\Microsoft.Extensions.Logging.Console.TrimmingTests.proj" /> |
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.
It'd be better to fix the test
2a87a7a
to
c052bd9
Compare
src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
Outdated
Show resolved
Hide resolved
Why isn't Refers to: src/libraries/System.Console/src/System/Console.cs:423 in 54c4907. [](commit_id = 54c4907b4b45d63bcb8527db09cbd717434e19c1, deletion_comment = False) |
Why is Refers to: src/libraries/System.Console/src/System/Console.cs:555 in 54c4907. [](commit_id = 54c4907b4b45d63bcb8527db09cbd717434e19c1, deletion_comment = False) |
54c4907
to
8053477
Compare
…evert unnecessary annotations and warning suppressions
8053477
to
e8927bf
Compare
Please, give it another review round 😄 |
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.
Looks good to me, but please also wait for a re-review from one of the previous reviewers.
Annotated public System.Console APIs throwing PNSE on Android.
No changes added to ref-part b/c no warnings appeared (maybe I missed something?).Part of #47911.