-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[dotnet-sdk-9.0.100-preview.7.24379.15] Fail to build CleanArchitecture2 app with an error "CS0619:'MudMenu.OffsetY' is obsolete: 'Use AnchorOrigin or TransformOrigin instead.'" #42509
Comments
@marcpopMSFT This issue was found during our source compat testing for the 3rd party application. Could you please help check and triage it? In the meantime, could you confirm if this is a blocker for .NET 9 Preview 7? Please help transfer to the correct team if this is not correct. Thanks very much. |
Looking. |
My opinion on this is that this is not a bug, in fact it's the correct / desired behavior. So the expectations from the customers should be adjusted accordingly. So perhaps the compatibility testing app validation scenarios should be adjusted to account for this change. |
Is the change introduced as part of the FUSE work considered as a breaking change or is it considered to be fixing a bug that was previously either being ignored or handled differently? Compat lab did not create this app. So we will need to notify the app owner and let them know that they need to make changes in their app to unblock adoption of .NET 9. The question is how common such usage could be in the real world and how many apps in the real world could be impacted similarly. Would you have documentation to make them aware of this change and what they need to do or reset customer expectations? cc @marklio |
Another question... Are these our APIs that are obsoleted? Or are these obsoletions in the MudBlazor library? If they are ours, were they obsoleted following the appropriate deprecation policy? (it seems odd that they are "throw error" deprecated. I don't see warnings as errors in this app) |
These are obsoletions in MudBlazor itself. The tested app is using properties that have been deprecated, and previously on the command line we wern't correctly surfacing the message (note that we were in the IDE). I would argue that this is a case of fixing a bug, not introducing a breaking change: the library was correctly telling the application not to use these properties and we were incorrectly not informing the user. Further, at the top the issue it's mentioned that these go away if you upgrade to MudBlazor 7.5.0. Looking at the source for MudBlazor these properties have been removed (hence the deprecation notice presumably). With the backing properties removed, the attributes just become HTML attributes which means the app is now broken at runtime, with no explanation to the user why. |
So, we are now properly surfacing errors as the library has already declared. That makes sense. I assume that these "worked" at runtime?
I realize it is orthogonal, but that seems like unfortunate behavior, particularly since we've been hiding the opportunity for obsoletion. Again, I don't think this really matters if adding "plan ol HTML attributes" to things is common. Might be nice to have an analyzer type thing that let you know the attribute isn't bound to anything. Again, I have no idea how useful/common that is. |
Yeah, this is interesting. I actually misspoke about these ending up as HTML attributes, it's up to the component in question what it does with them, but it's still valid to add arbitrary attributes to the component: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/splat-attributes-and-arbitrary-parameters?view=aspnetcore-8.0#arbitrary-attributes We might consider a warning when the component in question doesn't implement that feature, but that would definitely have to be behind a warning wave, which we haven't done yet. I'll make sure to open an issue to track that so we don't forget it. |
Closing this issue as it is by design according to comment #42509 (comment) and a new complier warning filed in warning wave #42509 (comment) |
Application Name: CleanArchitecture2
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-9.0.100-preview.7.24379.15
App Source checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2183568
Github Link:
https://github.com/blazorhero/CleanArchitecture
Verify Scenarios:
1). Windows 10 21H2 AMD64 + dotnet-sdk-6.0.424:Pass
2). Windows 10 21H2 AMD64 +dotnet-sdk-9.0.100-preview.6.24328.19: Pass
3). Windows 10 21H2 AMD64 +dotnet-sdk-9.0.100-preview.7.24379.15: Fail
Description :
When build the 3rd party application with the latest .NET 9 build "dotnet-sdk-9.0.100-preview.7.24379.15", it throws obsolete exception such as
"
error CS0619: 'MudMenu.OffsetX' is obsolete: 'Use AnchorOrigin or TransformOrigin instead
". After investigation, we found it is related to the MudBlazor Nuget package(Version : 6.0.2).This does not reproduce on dotnet-sdk-9.0.100-preview.6.24328.19. Could you help confirm whether this is expected? If Yes, is this a breaking change?
Findings:
The CS0619 error will be gone after upgrade the MudBlazor nuget package from V6.0.2 to the latest V7.5.0.
Minimal Repro Steps:
The machine has dotnet-sdk-9.0.100-preview.7.24379.15 installed
@using MudBlazor
Expected Result:
App build successfully.
Actual Result:
App build with error:
App Repro steps:
The machine has dotnet-sdk-9.0.100-preview.7.24379.15 installed.
Expected Result:
App build successfully.
Actual Result:
Fail to build the app with error:
Dotnet Info:
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: