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

Fix Platform Compatibility Code Analysis Violations #823

Closed
pjcollins opened this issue Apr 22, 2021 · 3 comments · Fixed by #6237
Closed

Fix Platform Compatibility Code Analysis Violations #823

pjcollins opened this issue Apr 22, 2021 · 3 comments · Fixed by #6237
Assignees
Labels
area-architecture Issues with code structure, SDK structure, implementation details fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! good first issue Good for newcomers t/enhancement ☀️ New feature or request

Comments

@pjcollins
Copy link
Member

pjcollins commented Apr 22, 2021

Context: #796

Remove the dotnet_diagnostic.CA1416.severity = none rule from .editorconfig and build locally to see a list of platform compatibility code analysis violations.

Binlogs for warnings treated as errors from initial .NET 6 preview 4 bump
binlogs.zip

Additionally, the BI1234 warnings in Essentials-net6 should be fixed.

@pjcollins pjcollins added t/bug Something isn't working t/enhancement ☀️ New feature or request good first issue Good for newcomers and removed t/bug Something isn't working good first issue Good for newcomers labels Apr 22, 2021
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Oct 26, 2021
@mattleibow mattleibow added the area-architecture Issues with code structure, SDK structure, implementation details label Nov 12, 2021
@mattleibow
Copy link
Member

Just did another run and this is still got stacks of warnings.

But, things are a bit weird for iOS. Since Apple marks things as deprecated, we get warning s saying that a method is unsupported on say iOS 14, so I am not sure how we are to express this in code.

void DoThing()
{
    if (on14AndLater)
        DoNewThing();  // warning: this is only available on 14+
    else
        DoOldThing();   // warning: this is not available on pre-14
}

@mattleibow
Copy link
Member

Hah! I see the new OperatingSystem.IsIOSVersionAtLeast or OperatingSystem.IsOSPlatformVersionAtLeast("ios", 14, 0) is incredibly smart!

Amazing! We should do this!

@mattleibow mattleibow removed this from New in Triage Nov 12, 2021
@mattleibow mattleibow added this to Ready for implementation in Enhancements Nov 12, 2021
@hartez
Copy link
Contributor

hartez commented Nov 12, 2021

Hah! I see the new OperatingSystem.IsIOSVersionAtLeast or OperatingSystem.IsOSPlatformVersionAtLeast("ios", 14, 0) is incredibly smart!

Amazing! We should do this!

So this, then? #461

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-architecture Issues with code structure, SDK structure, implementation details fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! good first issue Good for newcomers t/enhancement ☀️ New feature or request
Projects
Enhancements
Ready for implementation
Status: Done
6 participants