KCL: Show beautiful Miette errors when a KCL example test fails (#4829)
* KCL: Show beautiful Miette errors when a KCL example test fails Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs. Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )). Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output. * Update helix snapshots
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 129 KiB |
Binary file not shown.
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 140 KiB |
Reference in New Issue
Block a user