-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make Microsoft.Toolkit.Uwp.Notifications linker-friendly #4553
Make Microsoft.Toolkit.Uwp.Notifications linker-friendly #4553
Conversation
Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
c227d9d
to
f33fcd2
Compare
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.
Love seeing improvements like this! Couldn't spot any issues, but let's get another pair of eyes on this to make sure we didn't miss anything and it's all working :)
Need to track down new notifications PM to coordinate as they've owned this in the past. Following up with @marb2000 to find out who this is. |
Neat changes! As the original author of this code, from a quick 2-minute skim over the code changes, it seems like an okay change (and we have sufficient unit test coverage that if the unit tests are passing I'm quite confident everything is still working). I'll ping the new PM owner of notifications, Vaheeshta, and get her added to this pull request. |
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.
This is a welcome change. It was on my to do list but I was told there'd be a major refactoring in the future and integration into Reunion. So, I didn't bother to take it up. Glad to see this done!
Also fix a non matching filename
f33fcd2
to
ba85e32
Compare
@vaheeshta looks like we forgot to ping your account on this, mind taking a look and letting us know if you have any concerns? Thanks! |
Changes look good. @loneursid to take a look as well. |
Hey @loneursid, did you have a chance to take a look? We'd like to potentially push out a small hotfix once this is merged, so we can reference the new linker-friendly version in the Microsoft Store and stop blocking trimming for this package 😄 |
@Sergio0694, thanks for the ping, this totally fell off my radar. Will take a look shortly. |
That would be awesome, thank you! 😄 |
@Sergio0694 - at a glance the changes look good but I wanted to build the project and run the tests. I can clone the main repo, build it and run the tests but I could do that with yours. I can clone your fork but it fails to build. Am I missing something? |
Mmh that's weird, I'm also getting build errors now: They seem unrelated though, eg. the .NET Framework 4.6.1 TFM is out of support and I don't have it installed. The weird thing though is that checking out to 7eed078 (last commit from main), I can in fact build just fine. And the CI is also building just fine. I'm not really sure how the changes here could be causing that, especially because I didn't change anything related to TFMs... I'll take a look 🤔 |
@loneursid I can build just the Notifications project and run all tests, which pass: Can you at least repro this on your end as well? |
Actually trying this again, I get the same exact build errors from main too. I don't think this is related to this PR 🤔 @michael-hawker are there any known build issues locally for those? Can you build the solution? Like, it seems there's something wonky going on with the XamlIsland test project, but I don't see how it could be related to this PR at all, since it doesn't touch anything outside of the notification APIs. This is a red herring and unrelated from the changes in this PR, no? UPDATE: after installing the .NET Framework 4.6.2 SDK and targeting pack, I can build this branch too. |
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.
The code builds and all tests are passing.
Did not spot anything egregious in the change list
Thank you for taking a look @loneursid! 😄 I'll do another end to end test pass with a preview build of the Microsoft Store and merge this if everything looks good 🚀 |
Thanks @Sergio0694 yeah the 4.6.2 SDK targeting pack is a build requirement still, glad you were able to figure out that was the underlying issue. I haven't tried to build the main repo for a while now as we've been focused on Labs. I'll merge this in, and then we can figure out plans for strategy later, though if it can wait until the beginning of August to figure out hotfix that'd be ideal as we're trying to close down on the initial release of Labs. |
Oops, @Sergio0694 I misread your comment as have already doing that step and merged... let me know if you find an issue and we'll figure out a plan to rectify if so. Sorry, juggling many things right now! 🙈 |
Tested in the Store again, everything looking good! 🚀 Ship it! |
Closes #4552
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The
Microsoft.Toolkit.Uwp.Notifications
uses a lot of reflection and completely breaks down when trimming.Additionally, the package is trying to bundle an
.rd.xml
file for UWP to preserve metadata, but this doesn't really seem to be working anyway. Using the library in an app with trimming enabled will still cause all notifications to be broken.What is the new behavior?
The
Microsoft.Toolkit.Uwp.Notifications
package is fully trimmable (as reflection is no longer used).PR Checklist
Please check if your PR fulfills the following requirements: