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] do not apply Bindings if DataType doesnt match #22056

Merged
merged 3 commits into from
Jul 17, 2024
Merged

Conversation

StephaneDelcroix
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix commented Apr 25, 2024

simonrozsival
simonrozsival previously approved these changes May 17, 2024
@StephaneDelcroix StephaneDelcroix enabled auto-merge (squash) May 17, 2024 10:03
@PureWeen
Copy link
Member

/rebase

@PureWeen
Copy link
Member

PureWeen commented Jun 2, 2024

/rebase

Make sure the behavior of bindings is consistent accross implementations
(compiled/not compiled)

fixes a bunch of issues
@PureWeen PureWeen disabled auto-merge July 16, 2024 14:03
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

One the compatibility UI tests pass on this run
https://dev.azure.com/xamarin/public/_build/results?buildId=119409&view=results

let's merge

@PureWeen PureWeen merged commit cb0a332 into main Jul 17, 2024
97 checks passed
@PureWeen PureWeen deleted the fix_xDataType branch July 17, 2024 23:47
@PureWeen
Copy link
Member

/backport to net9.0

Copy link
Contributor

Started backporting to net9.0: https://github.com/dotnet/maui/actions/runs/10060482744

Copy link
Contributor

@PureWeen backporting to net9.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [X] do not apply Bindings if DataType doesnt match
.git/rebase-apply/patch:180: trailing whitespace.
			
.git/rebase-apply/patch:181: trailing whitespace.
			[Test] 
.git/rebase-apply/patch:190: trailing whitespace.
			
.git/rebase-apply/patch:191: trailing whitespace.
			[Test] 
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/Controls/src/Core/Binding.cs
M	src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs
M	src/Controls/src/Xaml/XamlServiceProvider.cs
M	src/Controls/tests/Xaml.UnitTests/BindingsCompiler.xaml.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Controls/tests/Xaml.UnitTests/BindingsCompiler.xaml.cs
Auto-merging src/Controls/src/Xaml/XamlServiceProvider.cs
CONFLICT (content): Merge conflict in src/Controls/src/Xaml/XamlServiceProvider.cs
Auto-merging src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs
CONFLICT (content): Merge conflict in src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs
Auto-merging src/Controls/src/Core/Binding.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 [X] do not apply Bindings if DataType doesnt match
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@PureWeen an error occurred while backporting to net9.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Aug 2, 2024
PureWeen added a commit that referenced this pull request Aug 6, 2024
PureWeen added a commit that referenced this pull request Aug 6, 2024
This reverts commit cb0a332.

# Conflicts:
#	src/Controls/src/Core/Binding.cs
#	src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs
#	src/Controls/src/Xaml/XamlServiceProvider.cs
PureWeen added a commit that referenced this pull request Aug 6, 2024
…24049)

This reverts commit cb0a332.

# Conflicts:
#	src/Controls/src/Core/Binding.cs
#	src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs
#	src/Controls/src/Xaml/XamlServiceProvider.cs
PureWeen added a commit that referenced this pull request Aug 6, 2024
@PureWeen PureWeen added this to the .NET 8 SR9 milestone Aug 7, 2024
@samhouts samhouts added fixed-in-8.0.80 fixed-in-net9.0-nightly This may be available in a nightly release! and removed fixed-in-net9.0-nightly This may be available in a nightly release! labels Aug 8, 2024
@AlleSchonWeg
Copy link
Contributor

Hi @simonrozsival ,
i updated my app to the latest nightly build and now i receive this warnings:

Microsoft.Maui.Controls.Xaml.Diagnostics.BindingDiagnostics: Warning: Mismatch between the specified x:DataType and the current binding context

Is it possible to add more infos to this warning which can help to find easier the cause? Perhaps the type specified in x:DataType and current BindingContext type which not match?!

Thank you

@simonrozsival
Copy link
Member

@AlleSchonWeg thanks for the feedback. What you suggest makes sense. Could you please open a new issue so that we can track it more easily?

@AlleSchonWeg
Copy link
Contributor

@simonrozsival
Issue created: #24349 😎

@samhouts samhouts added fixed-in-9.0.0-preview.7.24407.4 and removed fixed-in-net9.0-nightly This may be available in a nightly release! labels Aug 27, 2024
PureWeen added a commit that referenced this pull request Sep 10, 2024
PureWeen added a commit that referenced this pull request Sep 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
10 participants