Skip to content

Conversation

@StephaneDelcroix
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix commented May 26, 2021

Description of Change

Disable XamlC (but still validate on non-Release builds

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MauiKeepXamlResources>True</MauiKeepXamlResources>
<_MauiForceXamlCForDebug>True</_MauiForceXamlCForDebug>
Copy link
Member

Choose a reason for hiding this comment

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

How about we do False by default?

@StephaneDelcroix
Copy link
Contributor Author

StephaneDelcroix commented May 26, 2021 via email

@Redth Redth merged commit a30e243 into main May 27, 2021
@Redth Redth deleted the noXamlCOnDebug branch May 27, 2021 00:14
Condition=" '$(DesignTimeBuild)' != 'True' AND '@(MauiXaml)' != ''">
<PropertyGroup>
<_MauiXamlCValidateOnly>$(MauiXamlCValidateOnly)</_MauiXamlCValidateOnly>
<_MauiXamlCValidateOnly Condition="'$(Configuration)' != 'Release' AND '$(_MauiForceXamlCForDebug)' != 'True'">True</_MauiXamlCValidateOnly>
Copy link
Member

Choose a reason for hiding this comment

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

Just an FYI a user can name their $(Configuration) anything. So like this wouldn't work for an AppStore configuration.

It might be better to check other properties for this like $(Optimize) or $(DebugSymbols).

You wouldn't need to check $(EmbedAssembliesIntoApk), but this is what Xamarin.Android has used for a long time:

https://github.com/xamarin/xamarin-android/blob/4ed6a222ed07551734b28525dd269d50ac107ea8/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L302-L323

lytico pushed a commit to lytico/maui that referenced this pull request Jun 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2023
@samhouts samhouts added the fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants