Skip to content

Commit 05bf359

Browse files
timfennisclaude
andauthored
♻️ Replace miette and owo-colors with codespan-reporting (#118)
## Summary - Replace `miette` with `codespan-reporting` for error diagnostics - Replace `owo-colors` with `yansi` (already a workspace dependency) for syntax highlighting - Use codespan's `.with_code()` for error phase labels (e.g. `error[lexer]`, `error[vm]`) - Convert `InterpreterError` directly to codespan `Diagnostic`, removing the intermediate `NdcReport` / `Report` struct - Fix disassemble error path to pass source code through so span labels render correctly - Document branch naming convention in CLAUDE.md ## Test plan - [x] All 267 tests pass - [x] Clippy clean - [x] `cargo fmt` applied - [x] Manual check: run a script with an error and verify the diagnostic renders correctly - [x] Manual check: REPL error rendering - [x] Manual check: `ndc highlight` subcommand 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent e9a5365 commit 05bf359

8 files changed

Lines changed: 113 additions & 332 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Source → [Lexer] → Tokens → [Parser] → AST → [Analyser] → Annotated
6464
### Git Workflow
6565
- Prefer short commit messages, only use multiple lines in case of unrelated changes
6666
- Pull request titles must start with an emoji
67+
- Branch names use category prefixes: `feature/`, `bugfix/`, `housekeeping/`, etc.
6768

6869
### Crate Layout
6970

Cargo.lock

Lines changed: 20 additions & 174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ ndc_stdlib = { path = "ndc_stdlib" }
3333
num = "0.4.3"
3434
once_cell = "1.21.3"
3535
ordered-float = "5.1.0"
36-
owo-colors = { version = "4.3.0", features = ["supports-colors"] }
3736
yansi = { version = "1.0.1", features = ["detect-tty", "detect-env"] }
3837
rand = "0.10.0"
3938
rand_chacha = "0.10.0"

ndc_bin/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ anyhow.workspace = true
1313
clap.workspace = true
1414
itertools.workspace = true
1515
strsim.workspace = true
16-
miette = { version = "7.6.0", features = ["fancy"] }
16+
codespan-reporting = "0.11.1"
1717
ndc_lexer.workspace = true
1818
ndc_interpreter.workspace = true
1919
ndc_stdlib.workspace = true
2020
ndc_core.workspace = true
2121
ndc_lsp.workspace = true
22-
owo-colors.workspace = true
2322
yansi.workspace = true
2423
rustyline.workspace = true
2524
termimad = "0.34.1"

0 commit comments

Comments
 (0)