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

[X] Change the default value for xaml-comp #19390

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

StephaneDelcroix
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix commented Dec 13, 2023

The default value for the xaml-comp processing instruction used to be false, meaning that a XAML ResourceDictionary without code-behind wasn't compiled by XamlC unless the processing instruction was specified.

From now on, we will compile all XAML-only RD, unless the is set.

Thsi will help with performance and trimming

Description of Change

Issues Fixed

Fixes #

mattleibow
mattleibow previously approved these changes Dec 13, 2023
simonrozsival
simonrozsival previously approved these changes Dec 13, 2023
@@ -295,7 +295,7 @@ static bool TryParseXaml(SourceText text, string uid, Compilation compilation, A

if (rootClass != null)
XmlnsHelper.ParseXmlns(rootClass.Value, out rootType, out rootClrNamespace, out var rootAsm, out var targetPlatform);
else if (hasXamlCompilationProcessingInstruction)
else if (hasXamlCompilationProcessingInstruction && root.NamespaceURI == XamlParser.MauiUri)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added this check to make sure the file was valid Xaml, but it ain't right, even if it works

@Eilon Eilon added the area-xaml XAML, CSS, Triggers, Behaviors label Dec 13, 2023
The default value for the xaml-comp processing instruction used to be
false, meaning the a XAML ResourceDictionary without code-behind wasn't
compiled by XamlC unless the <?xaml-comp compile="true" ?> processing
instruction was specified.

From now on, we will compile all XAML-only RD, unless the <?xaml-comp
compile="false" ?> is set.

Thsi will help with performance and trimming
@mattleibow mattleibow merged commit 6cb9048 into main Dec 19, 2023
47 checks passed
@mattleibow mattleibow deleted the xaml-comp_default branch December 19, 2023 15:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants