SoulCrafted/Slicer
12
19
Fork
You've already forked Slicer
4

🛠️ Task: Implement configurable "reporters" #55

Open
opened 2026年03月23日 12:02:33 +01:00 by andreuz · 1 comment

For task automation, it might be useful to make it possible to configure "reporters", so the output of our CLI tools can be easily parsed & processed by other scripts & tools.

  • standard/original text reporter (already exists, but it hasn't been extracted as a "reporter")
  • JSON
For task automation, it might be useful to make it possible to configure "reporters", so the output of our CLI tools can be easily parsed & processed by other scripts & tools. - [ ] standard/original text reporter (already exists, but it hasn't been extracted as a "reporter") - [ ] JSON

Is the plan here for automation in workflow testing as the code-base develops, or is this more aimed at plugins / tools in a user's workflow ( or both? )

Depending on whether this is implemented in slicer-cli or at core level, the complexity and maintainability differ:

a) In slicer-cli, each new error variant would need changes in two places, declared in core, then translated into a ReportMessage (or equivalent) in slicer-cli. The wire format is decoupled from internal types, so refactors in core don't break downstream JSON consumers, but all this at the cost of more boilerplate per variant.

b) Use derives in core, which has zero slicer-cli boilerplate per variant, the core types are serialized directly. The downside is that the JSON wire format becomes coupled to internal field names in core. Renaming a field in core results in a breaking change for any external tool parsing the output. This may be acceptable, but the implication should be acknowledged up front.

c) A middle ground: derives in core plus explicit #[serde(rename = "...")] on every wire field. Same low slicer-cli cost as (b), but the wire contract is explicit and reviewable in core. Renames in core don't propagate to consumers unless the serde annotation is also changed, which would show up clearly in a diff.

Also, is it a streaming "array" of JSON objects or one unified report? Errors also need to be serialized into the report or is stderr and error code still the way to finalize a fatal error?

Is the plan here for automation in workflow testing as the code-base develops, or is this more aimed at plugins / tools in a user's workflow ( or both? ) Depending on whether this is implemented in _slicer-cli_ or at _core_ level, the complexity and maintainability differ: a) In _slicer-cli_, each new error variant would need changes in two places, declared in _core_, then translated into a `ReportMessage` (or equivalent) in _slicer-cli_. The wire format is decoupled from internal types, so refactors in core don't break downstream JSON consumers, but all this at the cost of more boilerplate per variant. b) Use _derives_ in _core_, which has zero _slicer-cli_ boilerplate per variant, the _core_ types are serialized directly. The downside is that the JSON wire format becomes coupled to internal field names in _core._ Renaming a field in _core_ results in a breaking change for any external tool parsing the output. This may be acceptable, but the implication should be acknowledged up front. c) A middle ground: _derives_ in _core_ plus explicit `#[serde(rename = "...")]` on every wire field. Same low _slicer-cli_ cost as (b), but the wire contract is explicit and reviewable in core. Renames in _core_ don't propagate to consumers unless the `serde` annotation is also changed, which would show up clearly in a diff. Also, is it a streaming "array" of JSON objects or one unified report? Errors also need to be serialized into the report or is stderr and error code still the way to finalize a fatal error?
Sign in to join this conversation.
No Branch/Tag specified
main
weblate-translations
win-installer
No results found.
Labels
Clear labels
App
CliSlicer
Application: Slicer (CLI version)
App
GuiSlicer
Application: Slicer (GUI version)
Arch
AMD64
CPU Architecture: AMD64 (x86 64bits)
Arch
ARM64
CPU Architecture: ARM64
Arch
RISC-V
CPU Architecture: RISC-V
Discussion
Discussion & Debate
Epic
High Level Task (Roadmap)
GPU
AMD
GPU: AMD
GPU
Intel
GPU: Intel
GPU
Nvidia
GPU: Nvidia
OS
Linux
Operating System: Linux
OS
Macos
Operating System: Macos
OS
Windows
Operating System: Windows
PR
Devex
Pull Request: Development
PR
Docs
Pull Request: Documentation
PR
Feature
Pull Request: Feature
PR
Fix
Pull Request: Fix
PR
Performance
Pull Request: Performance
PR
Refactor
Pull Request: Refactor
PR
Translations
Pull Request: Translations
Priority
0-Low
Low Priority
Priority
1-Medium
Medium Priority
Priority
2-High
High Priority
Priority
3-Critical
Critical Priority
Report
Bug
Report: Bug
Report
Devex Improvement
Report: Development Experience Improvement
Report
Documentation Request
Report: Documentation Request
Report
Feature Request
Report: Feature Request
Review
Confirmed
Review: Confirmed issue
Review
Duplicated
Review: Duplicated issue/PR
Review
Invalid
Review: Invalid issue/PR
Task
Architecture
Task: Software Architecture
Task
Management
Task: Managerial tasks
Task
Research
Task: Research
Tracking
Blocked
Tracking: Other tasks block the resolution of this issue
Tracking
Needs More Info
Tracking: Feedback is required to reproduce issue or to continue work
Tracking
Not Started
Tracking: Work has not started yet
Tracking
Triage
Tracking: Triage
Tracking
WIP
Tracking: Work in Progress
Tracking
Wontfix
Tracking: Won't be fixed
Windows
10
Windows: 10
Windows
11
Windows: 11
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SoulCrafted/Slicer#55
Reference in a new issue
SoulCrafted/Slicer
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?