Closed styris-ame closed 2 months ago
About severity of these problems:
MethodToCommandConverter, ObservableStreamPlugin are not a problem, since these classes are used only if a developer uses ReflectionBinding. With CompiledBindings these classes are not used.
Built-in COM support
probably mentions this issue. In short - current accessibility code uses old COM interop which isn't supported with NativeAOT/trimming. That's pretty much the only actual problem with these warnings.
Anything Avalonia.Diagnostics
related (including Microsoft.CodeAnalysis
) is expected, as we don't expect Avalonia.Diagnostics project to be used in Release builds. They are not trimming/AOT friendly because of the console feature that requires dynamic code.
ReactiveUI
and System.Reactive
are expected - these third-party libraries are not trimming/aot friendly. But System.Reactive
is improving with the latest versions.
@styris-ame why exactly do you think it is a bug? I think it is more of a feature request if there is anything you think we are missing. Can you specify what the "bug" for you is?
@timunie I was going off issue 8925, which is very similar and is listed as a bug. Also, even if they are just meaningless warnings, I would still consider something like this a slight bug. Feel free to change it to a feature request if you see fit, or even close it since it has been explained.
@styris-ame it's still good to track it š
Given that these do not seem to be particularly severe, is there a way to actually suppress them?
As it stands right now, trying to use Avalonia in an application with trimming enabled produces a bunch of errors. I got around it by manually suppressing each error code, but it doesn't feel right. I'm concerned I may be silencing actual errors that might appear in the future. What's the correct solution in this case?
I'm using Avalonia 11.0.10
with compiled bindings.
Describe the bug
Trimming warnings on fresh Avalonia MVVM template.
List of warnings:
To Reproduce
Steps to reproduce the behavior:
dotnet new install Avalonia.Templates
csproj
Expected behavior
No warnings
Environment
Avalonia .NET MVVM App
with .NET 8Additional context
Similar to issue 8925. Note:
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
is in the csproj file.