-
Notifications
You must be signed in to change notification settings - Fork 405
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
[BUG] Snackbar InvalidOperationException when using dotnet trimmer #1460
Comments
@pictos |
Also, if the MCT is not trimmer ready, maybe it should simply have its IsTrimmable attribute set. This would solve this issue. |
@VladislavAntonyuk - could you add <PropertyGroup>
<IsTrimmable>false</IsTrimmable>
</PropertyGroup> Here's the .NET 8 docs for it: |
Yes, you can. Just like you should do when you have the linker enabled on Xamarin.Forms app.
Not sure what that would do, if you say it will solve the issue, I believe this will skip our lib during the Linker process. And is there a way for consumers to change that configuration? I mean, let's say that I've my app and I want it to be as small as possible and trim MCT and handle the exceptions by myself. Could I do that setting it to false? Today, having that not set, consumers can just create the XML file and show that they don't want to trim the lib. That said, from a lib perspective, being more permissive here is better |
Thanks Pedro! I don't disagree. One data point: the size of the NuGet Package for That being said, if anyone wants to open a PR to enable Trimming, I'd be more than happy to review + merge it! |
@pictos |
By the way, the descriptors doc is here: https://github.com/dotnet/linker/blob/main/docs/data-formats.md |
@tranb3r this is more a cat/ mouse game... Like the error will give you a hint about what is missing, in this case, is the |
@pictos |
@pictos |
@tranb3r thanks for looking into it, we don't support .net8 bits yet, so not sure if could be that... Maybe, when we set our TFM to net8 the issue goes away, but I don't know. Hey @jonathanpeppers, do you know something that may changed on Linker on the latest android bits? |
It could be related to this, which will be fixed in .NET 8 GA: dotnet/android@03018e0 There might be an intermediate release before GA, where we have a chance to ship this change. |
@jonathanpeppers @brminnick |
In #1367, we added We discussed this in this Issue above: #1460 (comment) Next time, please review the PR code and the comment history in the Issue before tagging me. We are all volunteers working on the CommunityToolkit; we don't get paid by Microsoft to do this work, and our time is limited. Line 14 in fa59686
|
Sorry for tagging you but as the issue wa closed it was probably the only way to get your attention. |
Note that setting Details at: dotnet/maui#18658 |
Noted- thanks @jonathanpeppers! I’ll open an Issue and we’ll certainly be sure to add Trimmer support before iOS moves to NativeAOT in .NET 9 💯 |
This issue is fixed in version 7.0.0 of CommunityToolkit.Maui. Please note that the added |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When attempting to show a
Snackbar
on a Maui app for Android with dotnet trimmerfull
mode enabled, the following exception occurs:Expected Behavior
Instead of throwing an exception, the
Snackbar
should be displayed.Workaround: do not trim CommunityToolkit.Maui
Steps To Reproduce
Link to public reproduction project repository
https://github.com/tranb3r/Issues/tree/main/MauiAppSnackbar
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: