feat: rust error emitting
Metadata
Current evaluation
Merged in canonical/craft-cli#432, restoring error() and report_error() to the Rust Emitter.
Resolution: closed resolved
Reason: Pull request #432 was merged after approval from three reviewers, restoring the missing Rust Emitter error-reporting APIs.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [ ] Have you followed the guidelines for contributing?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint && make test`?
---
Adds back `error` and `report_error` to the Rust Emitter.
Here's a script for easy testing:
```py
from craft_cli import CraftError, Emitter, Verbosity
class CraftierError(CraftError):
"""An error, but it's real crafty. Look out, kids."""
e = Emitter(Verbosity.TRACE, "blah.log", "Hello", streaming_brief=True)
err = CraftierError(
"You smell bad.",
details="We're talking like, I'm reasonably sure there's a provision in the Geneva Conventions for the chemicals you're emitting.",
resolution="Shower.",
docs_url="https://www.homedepot.com/b/Bath-Showers/N-5yc1vZbzcd",
show_logpath=False,
)
e.error(err)
e.message("I'm going to explode, but at least it's not a panic!")
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-cli#432, restoring error() and report_error() to the Rust Emitter. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR canonical/craft-cli#432 restored error() and report_error() on craft-cli’s Rust Emitter, following approval from three reviewers. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged pull request that restores error and report_error functionality to the Rust Emitter. Approved by three reviewers and passed CI checks before integration. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #381 feat: make report_error public | craft-cli | merged | Merged PR craft-cli#381 (commit 8103c35, CRAFT-4703) made Emitter.report_error() public so errors can be printed without stopping the emitter; shipped in 3.2.0. Unblocked craft-application#897. | |
| #411 feat: oxidize the emitter | craft-cli | merged | Merged #411 reimplemented Craft CLI's emitter in Rust with PyO3/Maturin, removed global emit, and switched the build backend. |