Repository navigation
Fix native path assertion in font embedding test - #267
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Canonical font path assertion crates/fonts-build/src/tests.rs |
The test checks the complete include_bytes! expression using the selected font’s canonicalized path. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Possibly related PRs
- storytold/craft-libs#259: Introduces the font-build test and the assertion updated here.
Suggested reviewers: aiongg
Merge Risk: 
Minimal · up to 8dbbb
-
No production behavior changes or actionable merge-blocking risks remain.
Architecture risk: 
Low · up to 8dbbb
-
The change affects 1 system.
Changed systems:
cratesArchitecture concerns
No architecture-level concerns identified.Review details
-
Systems and components
- observed — crates (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in crates/fonts-build/src/tests.rs: The test replaces a relative-path substring check with a check for the complete
include_bytes!expression using the selected font’s canonicalized path.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the diff: a font-embedding test in fonts-build asserted r.table.contains("fonts/1.ttf"), which fails on Windows where the generated Rust escapes native separators and uses the canonical path prefix; it now builds the expected text from the canonical path, include_bytes!({interface_face:?}), which uses the Debug formatting of the path (the same escaping the generator uses). Matching the generator's own output form on every platform is the right fix instead of loosening the assertion. The two things to check are that canonicalize() on Windows returns the \\?\ prefixed path and the generator is given the same canonical path (the comment says it escapes "Windows' canonical path prefix"), and that Debug formatting of a PathBuf and the generator's escaping agree for a non-ASCII temp directory name. I have not run it (Windows is the failing platform), and no exact-head CI result exists for this head; craft-libs has no fork CI, so this is a source-read comment and not an approval. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Group related dialog and inspector settings in reusable frames with optional accessible headings. Makes the reusable part of [WordCraft #4038](storytold/wordcraft#4038) available to other Craft apps. Includes API documentation, integration guidance and regression coverage. Consumer adoption remains separate; applications retain their themes, localization and command adapters. Validation on Windows: workspace formatting, strict Clippy and tests; craft-ui Clippy/tests with all features; craft-ui WASM check with all features. Upstream CI results are tracked on this PR. Includes the shared test-portability prerequisite [#267](#267); the feature itself is independent of the other UI proposals. [Integration guide](https://github.com/fluorine/craft-libs/blob/fad5c05170d43f9bdf86c6063131e28669fcb176/crates/ui/README.md). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added customizable sections for grouping content vertically, with optional headings and configurable spacing. * Sections can fill the available width or use a caller-defined width, and return the result of their content callback. * **Documentation** * Added usage guidance and an example for styling sections in dialogs and inspector panels. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fix native path assertion in font embedding test
Group related dialog and inspector settings in reusable frames with optional accessible headings. Makes the reusable part of [WordCraft storytold#4038](storytold/wordcraft#4038) available to other Craft apps. Includes API documentation, integration guidance and regression coverage. Consumer adoption remains separate; applications retain their themes, localization and command adapters. Validation on Windows: workspace formatting, strict Clippy and tests; craft-ui Clippy/tests with all features; craft-ui WASM check with all features. Upstream CI results are tracked on this PR. Includes the shared test-portability prerequisite [storytold#267](storytold#267); the feature itself is independent of the other UI proposals. [Integration guide](https://github.com/fluorine/craft-libs/blob/fad5c05170d43f9bdf86c6063131e28669fcb176/crates/ui/README.md). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added customizable sections for grouping content vertically, with optional headings and configurable spacing. * Sections can fill the available width or use a caller-defined width, and return the result of their content callback. * **Documentation** * Added usage guidance and an example for styling sections in dialogs and inspector panels. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
The interface-font fixture compares a POSIX path fragment against generated Rust containing escaped native separators. On Windows the embedding is correct but the test fails.
Match the selected file's complete canonical
include_bytes!expression. This strengthens the existing assertion across platforms and changes no production behavior. Reproduced the failure on unmodified upstream2eca9b3, then verified the corrected test passes.Validation on Windows: workspace formatting, strict Clippy and tests; craft-ui Clippy/tests with all features; craft-ui WASM check with all features.
Integration guide.
Summary by CodeRabbit