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

Clean up suppression of CS0109 and CS0114 #248

Closed
3 of 24 tasks
Balkoth opened this issue Oct 5, 2023 · 6 comments
Closed
3 of 24 tasks

Clean up suppression of CS0109 and CS0114 #248

Balkoth opened this issue Oct 5, 2023 · 6 comments

Comments

@Balkoth
Copy link

Balkoth commented Oct 5, 2023

Describe the bug

There are four locations in the codebase where CS0109 is suppressed. I can not find a reason why the suppressions are not just simply cleaned up.

image

Steps to reproduce

Build the codebase.

Expected behavior

No suppression of CS0109.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

17.7.4

Device form factor

Desktop

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

@michael-hawker
Copy link
Member

@Balkoth pretty sure these are here for Uno, they're only needed when compiling on certain Uno platforms but not for Windows.

Don't remember the old issue/discussion we had on this somewhere here or in our tooling repo. Probably similar for #250 that you filed too?

FYI @Arlodotexe who may remember more.

@Balkoth
Copy link
Author

Balkoth commented Oct 11, 2023

I guessed that too after i filed the issues and created the pull requests. Imho the methods definitions should be ifdefd for the correct platforms, then there would be no need to suppress the warnings.

If someone guides me on how to build for all the supported platforms (on my windows machine) i will gladly help out.

This was linked to pull requests Jan 23, 2024
@Arlodotexe
Copy link
Member

Arlodotexe commented Jan 23, 2024

Noting CS0114 is used in some places with the same message "Member does not hide an inherited member. The new keyword is not required":

image

Relevant docs:

Git history suggests these were added to resolve a CI issue during the port from the old repo (see #83 @ 8960c7a). The logs for this CI run have since expired, but we can check if/why it may be needed by just removing it and seeing if any issues show in the CI.

@Arlodotexe Arlodotexe changed the title Clean up suppression of CS0109 - The member 'member' does not hide an inherited member. The new keyword is not required Clean up suppression of CS0109 and CS0114 Jan 23, 2024
@Arlodotexe
Copy link
Member

Here's the full error message, pulled from the latest CI run:

2024-01-23T22:39:43.4070369Z        "C:\a\Windows\Windows\CommunityToolkit.AllComponents.sln" (default target) (1:2) ->
2024-01-23T22:39:43.4071154Z        "C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj" (default target) (29:39) ->
2024-01-23T22:39:43.4071954Z        "C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj" (Build target) (29:55) ->
2024-01-23T22:39:43.4072106Z        (CoreCompile target) -> 
2024-01-23T22:39:43.4074755Z          C:\a\Windows\Windows\components\LayoutTransformControl\src\LayoutTransformControl.Properties.cs(72,22): error CS0114: 'LayoutTransformControl.Transform' hides inherited member 'UIView.Transform'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj::TargetFramework=net7.0-ios]
2024-01-23T22:39:43.4075139Z 
2024-01-23T22:39:43.4075143Z 
2024-01-23T22:39:43.4075545Z        "C:\a\Windows\Windows\CommunityToolkit.AllComponents.sln" (default target) (1:2) ->
2024-01-23T22:39:43.4076322Z        "C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj" (default target) (29:39) ->
2024-01-23T22:39:43.4077075Z        "C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj" (Build target) (29:53) ->
2024-01-23T22:39:43.4079760Z          C:\a\Windows\Windows\components\LayoutTransformControl\src\LayoutTransformControl.Properties.cs(72,22): error CS0114: 'LayoutTransformControl.Transform' hides inherited member 'UIView.Transform'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [C:\a\Windows\Windows\components\LayoutTransformControl\src\CommunityToolkit.WinUI.Controls.LayoutTransformControl.csproj::TargetFramework=net7.0-maccatalyst]
2024-01-23T22:39:43.4079767Z 

It looks like it's only an issue under ios and mac targets. I'd like to wait for #281 to close first, in case the situation has changed in the latest version of Uno.

@Arlodotexe
Copy link
Member

Looks like there's no change under the latest version of Uno 5. We'll keep things as-is for now.

I've filed an issue with Uno to hopefully get it a fix that doesn't include warning suppression.

@Balkoth
Copy link
Author

Balkoth commented Nov 20, 2024

Closing as no one seems to care about this.

@Balkoth Balkoth closed this as completed Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants