-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[X] Improve warnings when binding cannot be compiled #21281
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
[X] Improve warnings when binding cannot be compiled #21281
Conversation
|
As a suggestion, for newcomers, a performance improvement tip would be better ( I know it is in the links), but it is a better call to action for developers. everyone wants performance :) |
|
if we're providing the link for help, we should also make the warning clickable on VS, by supporting HelpLink |
|
@balachir thanks for the suggestion @PureWeen @jonathanpeppers @StephaneDelcroix I suggest adding a |
...ontrols/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets
Outdated
Show resolved
Hide resolved
|
/rebase |
612092f to
ac9a661
Compare
...ontrols/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets
Outdated
Show resolved
Hide resolved
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.
shouldn't it add the exceptions to WarningsNotAsErrors instead of NoWarn, so the warnings will still be displayed ?
|
@StephaneDelcroix I think it might be better to completely hide the warnings in .NET 8 to decrease friction for customers migrating from Xamarin.Forms. |
Maybe warning are too harsh, but hiding them will only defer the friction till .NET9 is release. What do you think about logging them as 'Message', like |
|
@StephaneDelcroix would that even be printed to the log (especially with the new msbuild terminal logger)? Wouldn't the messages only be visible in binlogs? At that point, isn't it better to skip the logs altogether? |
|
@StephaneDelcroix I reverted the changes that disable the warnings for now. I suggest we merge the updated warning message and I'll open a separate PR where we can continue the discussion whether to disable those warnings or not. |
Description of Change
In #19360 we introduced a warning that's reported when XamlC cannot compile a binding because we don't know the data type of the source (
x:DataTypeis missing). To make this warning less confusing to customers, I suggest adding a link to the docs so that it is immediately clear how to improve the code to address the warning.Also, it might be worth hiding these warnings unless developers opt-in to a "XamlC strict mode". This should be the default for NativeAOT and in .NET 9 it could be the default for all apps. To make migration from Xamarin.Forms easier, we might want to hide these warnings in the next .NET 8 servicing release.
Issues Fixed
Based on feedback in #21277
/cc @StephaneDelcroix @davidortinau