-
Notifications
You must be signed in to change notification settings - Fork 832
Misc non functionnal adjustment for XAML code gen #21874
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 refactoring PR improves the XAML code generation test infrastructure by adjusting output directories and refactoring error handling. The main changes consolidate error reporting through a new context class and update the test infrastructure to organize output by test file name, preventing conflicts when tests share method names.
Key changes:
- Introduces
XamlFileParserContextfor centralized error collection during XAML parsing - Changes from single
ParsingErrortoParsingErrorscollection inXamlFileDefinition - Updates test output directory structure to include test file name, avoiding collisions
- Moves
SourceLinkinitialization earlier and includes it in cache key for correctness - Improves error reporting for invalid
RelativeSourcebindings
Reviewed Changes
Copilot reviewed 27 out of 263 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| XamlFileParserContext.cs | New context class for collecting parsing errors |
| XamlFileParser.cs | Refactored to use context-based error collection and fixed cache key |
| XamlFileParser.Cache.cs | Added Link property to cache key for correctness |
| XamlFileGenerator.cs | Uses XamlConstants and adds validation for RelativeSource |
| XamlFileDefinition.cs | Changed from single error to error collection |
| XamlCodeGeneration.cs | Updated to iterate over error collection |
| CSGenerator.cs | Modified output path to include test file name |
| Test output files | Generated test outputs in new directory structure |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21874/wasm-skia-net9/index.html |
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21874/docs/index.html |
2936065 to
1691498
Compare
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 3 out of 239 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileParser.cs:1
- [nitpick] The variable 'member' is declared as nullable but is not initialized. While it will be assigned in all code paths before use, initializing it to 'default' or 'null' makes the intent clearer and follows defensive programming practices.
src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileParser.cs:1 - Corrected grammar from 'a positional members' to 'positional members'.
...rators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_HotReloadEnabledInBuild.cs
Outdated
Show resolved
Hide resolved
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21874/docs/index.html |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21874/wasm-skia-net9/index.html |
|
The build 183647 found UI Test snapshots differences: Details
|
|
|
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21874/docs/index.html |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21874/wasm-skia-net9/index.html |
|
The build 183920 found UI Test snapshots differences: Details
|
c92934a to
b97e7fc
Compare
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 3 out of 239 changed files in this pull request and generated no new comments.
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21874/wasm-skia-net9/index.html |
|
The build 184921 found UI Test snapshots differences: Details
|
π Refactoring (no functional changes, no api changes)
What is the current behavior? π€
What is the new behavior? π
PR Checklist β
Screenshots Compare Test Runresults.Other information βΉοΈ
This PR is based on #21867 that is expected to be merged first