-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Trimmable runtime xaml loader #12937
Conversation
You can test this PR using the following package version. |
src/Markup/Avalonia.Markup.Xaml.Loader/CompilerDynamicDependencies.cs
Outdated
Show resolved
Hide resolved
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
* Add trimming attributes to the Runtime XAML Loader project * Create CompilerDynamicDependenciesAttribute with all known dynamic types * Use master XamlX * Implement CompilerDynamicDependenciesGenerator to simplify CompilerDynamicDependencies attribute * Better formatting of generated code * Be safe about type converters as well * Remove unnecessary warning * Also include FindType just in case
What does the pull request do?
Makes trimmed application to not crash while using runtime XAML parser.
How was the solution implemented (if it's not obvious)?
One of the solutions was to use
DynamicallyAccessedMembers
attribute onTypeSystem.FindType(string)
members, but it requires adding the assembly full name to each type, which is undesirable.Instead,
DynamicDependency
attribute for each known runtime type dependency was added.Fixed issues
Fixes #12419