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] Warn on non compiled bindings #19360

Merged
merged 3 commits into from
Dec 20, 2023
Merged

[X] Warn on non compiled bindings #19360

merged 3 commits into from
Dec 20, 2023

Conversation

StephaneDelcroix
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix commented Dec 12, 2023

Description of Change

When XamlC can't compile a Binding due to missing x:DataType, log a
warning.

If you use TreatWarningsAsErrors, add XC0022 and XC0023 to WarningsNotAsErrors to
avoid the build failing

Issues Fixed

! this is based on top of #19337. Merge that one then rebase.

Fixes #

@StephaneDelcroix StephaneDelcroix requested a review from a team as a code owner December 12, 2023 12:31
@StephaneDelcroix StephaneDelcroix added the legacy-area-perf Startup / Runtime performance label Dec 12, 2023
@StephaneDelcroix StephaneDelcroix force-pushed the WarnOnNonCompiledBindings branch from e460eef to d5bc45c Compare December 13, 2023 11:05
@StephaneDelcroix StephaneDelcroix force-pushed the WarnOnNonCompiledBindings branch 5 times, most recently from f965259 to 5c3394e Compare December 15, 2023 08:07
simonrozsival
simonrozsival previously approved these changes Dec 15, 2023
@@ -389,13 +389,18 @@ static IEnumerable<Instruction> CompileBindingPath(ElementNode node, ILContext c
n = n.Parent as IElementNode;
}

if (dataTypeNode is null)
if (dataTypeNode is null) {
context.LoggingHelper.LogWarningOrError(10101, context.XamlFilePath, node.LineNumber, node.LinePosition, 0, 0, $"Binding could be compiled if x:DataType is specified", null);
Copy link
Member

Choose a reason for hiding this comment

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

Should these codes be documented somewhere ? or references from a static that has documentation about these numbers?

@rmarinho
Copy link
Member

@StephaneDelcroix I think this needs another rebase now right?

@StephaneDelcroix StephaneDelcroix force-pushed the WarnOnNonCompiledBindings branch from 8ad1b2f to 4e84a1e Compare December 19, 2023 14:01
@StephaneDelcroix
Copy link
Contributor Author

@rmarinho y, done

@rmarinho
Copy link
Member

/rebase

@github-actions github-actions bot force-pushed the WarnOnNonCompiledBindings branch from 4e84a1e to dd73647 Compare December 19, 2023 15:37
@StephaneDelcroix StephaneDelcroix force-pushed the WarnOnNonCompiledBindings branch from dd73647 to e702845 Compare December 19, 2023 15:44
@rmarinho
Copy link
Member

/rebase

When XamlC can't compile a Binding due to missing x:DataType, log a
warning.

If you use TreatWarningsAsErrors, add XC10101 to WarningsNotAsErrors to
avoid the build failing
@github-actions github-actions bot force-pushed the WarnOnNonCompiledBindings branch from e702845 to 35bbb34 Compare December 19, 2023 22:00
@rmarinho rmarinho merged commit 6d6c9cb into main Dec 20, 2023
47 checks passed
@rmarinho rmarinho deleted the WarnOnNonCompiledBindings branch December 20, 2023 10:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2024
@Eilon Eilon added the t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-8.0.7 fixed-in-9.0.100-preview.1.9973 legacy-area-perf Startup / Runtime performance t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants