Skip to content
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

Remove our dependency on Microsoft.Toolkit.Win32.UI.XamlApplication #14520

Merged
4 commits merged into from
Dec 12, 2022

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented Dec 9, 2022

We originally needed this library (or a separate DLL in our own project)
to handle hooking up the XAML resource loader to the providers that our
application needed. It was introduced in its nascent form in 2019, in a
PR titled "Make XAML files work."

It appears we no longer need it, and the provider hookup is being
handled by our AppT2 base class override. I've tested this in Windows
10 Vb running unpackaged, and it seems to work totally fine. Crazy.

Removing this dependency saves us a couple hundred kilobytes on disk and
removes one consumer of the App CRT from our package.

We used to require it. Now it looks like we don't, so merge its init
code into our App.
}
}

void App::Close()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

behavior that was originally trapped in the toolkit application is herein merged (same for TerminalApp)

namespace winrt::SampleApp::implementation
{
App::App()
{
// This is the same trick that Initialize() is about to use to figure out whether we're coming
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is still relevant

@awakecoding
Copy link

🚀 thanks a lot for these changes, this will bring us closer to properly supporting a Windows Terminal build option without the dynamic visual studio runtime! 🙏🪄

@carlos-zamora
Copy link
Member

@msftbot merge this in 10 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 12, 2022
@ghost
Copy link

ghost commented Dec 12, 2022

Hello @carlos-zamora!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Mon, 12 Dec 2022 20:58:39 GMT, which is in 10 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@DHowett
Copy link
Member Author

DHowett commented Dec 12, 2022

I trust this change about as far as I could throw it... so I'd love to get a good validation pass on the release build after it lands :)

@ghost ghost merged commit 68cce10 into main Dec 12, 2022
@ghost ghost deleted the dev/duhowett/hax/no-more-xamlhost branch December 12, 2022 20:59
@DHowett DHowett added this to To Cherry Pick in 1.16 Servicing Pipeline via automation Dec 12, 2022
@DHowett DHowett removed this from To Cherry Pick in 1.16 Servicing Pipeline Dec 12, 2022
DHowett added a commit that referenced this pull request Dec 14, 2022
…14520)

We originally needed this library (or a separate DLL in our own project)
to handle hooking up the XAML resource loader to the providers that our
application needed. It was introduced in its nascent form in 2019, in a
PR titled "Make XAML files work."

It appears we no longer need it, and the provider hookup is being
handled by our `AppT2` base class override. I've tested this in Windows
10 Vb running unpackaged, and it seems to work totally fine. Crazy.

Removing this dependency saves us a couple hundred kilobytes on disk and
removes one consumer of the App CRT from our package.

(cherry picked from commit 68cce10)
DHowett added a commit that referenced this pull request Dec 14, 2022
…14520)

We originally needed this library (or a separate DLL in our own project)
to handle hooking up the XAML resource loader to the providers that our
application needed. It was introduced in its nascent form in 2019, in a
PR titled "Make XAML files work."

It appears we no longer need it, and the provider hookup is being
handled by our `AppT2` base class override. I've tested this in Windows
10 Vb running unpackaged, and it seems to work totally fine. Crazy.

Removing this dependency saves us a couple hundred kilobytes on disk and
removes one consumer of the App CRT from our package.

(cherry picked from commit 68cce10)
@sylveon
Copy link

sylveon commented Dec 30, 2022

FWIW, I have been running a XAML Islands app in prod without that dependency for ~2 years :)

I've never liked that dependency (and the forced App CRT dep it implies) so quickly worked getting rid of it once I realized it never did much.

TranslucentTB/TranslucentTB@021ede7

DHowett added a commit that referenced this pull request Jan 20, 2023
…14520)

We originally needed this library (or a separate DLL in our own project)
to handle hooking up the XAML resource loader to the providers that our
application needed. It was introduced in its nascent form in 2019, in a
PR titled "Make XAML files work."

It appears we no longer need it, and the provider hookup is being
handled by our `AppT2` base class override. I've tested this in Windows
10 Vb running unpackaged, and it seems to work totally fine. Crazy.

Removing this dependency saves us a couple hundred kilobytes on disk and
removes one consumer of the App CRT from our package.

(cherry picked from commit 68cce10)
@DHowett
Copy link
Member Author

DHowett commented Jan 20, 2023

@sylveon thanks so much for that. Gives me the confidence to backport this to stable and remove one more variable from our troubleshooting pipeline :)

@DHowett DHowett added this to To Cherry Pick in 1.16 Servicing Pipeline via automation Jan 20, 2023
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.16 Servicing Pipeline Jan 20, 2023
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal v1.16.1023 (10231 and 10232) has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

@zadjii-msft
Copy link
Member

Could removing this have caused #14729? I'd reckon it's possible. Maybe there's an interplay between this and the FWP/Win11 version of the package.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants