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

[tests] fix 1,170 build warnings #9137

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

jonathanpeppers
Copy link
Member

There are lots of warnings like:

.\dotnet-local.cmd build .\tests\Mono.Android-Tests\Runtime-Microsoft.Android.Sdk\Mono.Android.NET-Tests.csproj
...
.\tests\Mono.Android-Tests\Java.Interop\JavaConvertTest.cs(134,20):
warning CA1416: This call site is reachable on all platforms. 'Object' is only supported on: 'Android' 21.0 and later.
(https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
...
Build succeeded with 1192 warning(s) in 44.4s

Several APK test projects need to set:

<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>

In order to keep the .NET analyzer happy.

After these changes:

Build succeeded with 22 warning(s) in 38.4s

There are lots of warnings like:

    .\dotnet-local.cmd build .\tests\Mono.Android-Tests\Runtime-Microsoft.Android.Sdk\Mono.Android.NET-Tests.csproj
    ...
    .\tests\Mono.Android-Tests\Java.Interop\JavaConvertTest.cs(134,20):
    warning CA1416: This call site is reachable on all platforms. 'Object' is only supported on: 'Android' 21.0 and later.
    (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
    ...
    Build succeeded with 1192 warning(s) in 44.4s

Several APK test projects need to set:

    <SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>

In order to keep the .NET analyzer happy.

After these changes:

    Build succeeded with 22 warning(s) in 38.4s
@jonathanpeppers
Copy link
Member Author

There is one MSBuild test failure we can ignore:

System.Net.WebException : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. [::ffff:52.240.159.111]:443 (www.nuget.org:443)

@jonathanpeppers jonathanpeppers merged commit ad82218 into dotnet:main Jul 25, 2024
54 of 57 checks passed
@jonathanpeppers jonathanpeppers deleted the FixWarningsAPKTests branch July 25, 2024 13:27
grendello added a commit that referenced this pull request Jul 26, 2024
* main:
  [Xamarin.Android.Build.Tasks] Fix `LogCodedWarning` usage (#9148)
  [xaprepare] Remove Mono as required component (#9144)
  $(AndroidPackVersionSuffix)=rc.1; net9 is 35.0.0-rc.1 (#9143)
  [monodroid] treat `LocalRefsAreIndirect` as always true (#9138)
  [Mono.Android] fix leaking lrefs in `TypeManager` (#9136)
  [ci] Ignore unsigned bundletool.jar content (#9139)
  Localized file check-in by OneLocBuild Task (#9140)
  [tests] fix 1,170 build warnings (#9137)
  LEGO: Merge pull request 9141
  Bump to xamarin/monodroid@d1d43ab161 (#9130)
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants