-
Notifications
You must be signed in to change notification settings - Fork 834
Improves XAML code gen (Error reporting + HR) #21867
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a potential ENC0004 error during Hot Reload by conditionally removing the static modifier from generated template builder methods when HR is enabled. The PR also enhances error handling by supporting multiple parsing errors per file and adds validation for RelativeSource bindings in XAML.
Key Changes
- Removes
staticmodifier from template builder methods when Hot Reload is enabled to prevent ENC0004 errors - Refactors error handling from single to multiple errors per XAML file
- Adds validation for RelativeSource binding syntax and properties
- Includes cache key updates to account for source link variations
Reviewed Changes
Copilot reviewed 26 out of 57 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
XamlFileGenerator.cs |
Conditionally generates instance methods instead of static when HR is enabled; adds RelativeSource validation |
XamlFileDefinition.cs |
Changes from single ParsingError to ParsingErrors collection; makes SourceLink required in constructor |
XamlFileParser.cs |
Refactors to use XamlFileParserContext for error collection; adds missing comma detection in bindings |
XamlFileParserContext.cs |
New class for collecting multiple parsing errors during XAML parsing |
XamlCodeGeneration.cs |
Updates to iterate over multiple errors instead of single error |
XamlFileParser.Cache.cs |
Adds Link to cache key to differentiate files with same content but different links |
| Test files | Multiple new tests for error scenarios and Hot Reload scenarios; updated expected outputs |
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21867/docs/index.html |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21867/wasm-skia-net9/index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 26 out of 59 changed files in this pull request and generated no new comments.
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21867/docs/index.html |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21867/wasm-skia-net9/index.html |
|
The build 183567 found UI Test snapshots differences: Details
|
|
About relevant comments from copilot: they are addressed in a coming PR #21874 |
|
@mergify backport release/stable/6.4 |
β Backports have been createdDetails
|
closes #21860
closes https://github.com/unoplatform/uno.hotdesign/issues/5418
β¨ Feature / π Bugfix
β¨ Add ability to pass over invalid binding syntax in code gen
πFix possible ENC0004 with HR
What is the current behavior? π€
What is the new behavior? π
staticmethod.PR Checklist β
Screenshots Compare Test Runresults.Other information βΉοΈ
This PR is based on #21865 (and contains same changes)