1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
//! The verbs blueprint §17 lists that this build does not implement yet,
//! and the one place that says which wave each of them belongs to.
//!
//! Every verb in the §17 table parses with its real argument schema — so
//! `--help`, shell completion and argument validation describe the whole
//! surface — and all but these reach a real implementation. What is left
//! here is nothing at all: **every** §17 verb now reaches a real
//! implementation in `crate::dispatch`, and [`STUBBED_VERBS`] is empty.
//!
//! The module is kept rather than deleted because the *mechanism* — a verb
//! that parses with its real argument schema, reports
//! [`crate::error::CliError::NotImplementedYet`] naming the wave that owns
//! it, and exits [`crate::error::EXIT_UNAVAILABLE`] so a script can tell it
//! apart from a failure — is the right shape for the next crate this build
//! predates, and re-deriving it later would be worse than keeping four
//! constants and a lookup.
//!
//! # What left this table, wave by wave
//!
//! `record start`, `record stop`, `replay` and `bag info` used to be listed
//! here. The recorder (`astrs-recording`, with `.arec` reader, writer and
//! seekable index) landed in W4, so all four now dispatch to
//! [`crate::command::record`], [`crate::command::replay`] and
//! [`crate::command::bag`].
//!
//! `bag convert` stayed behind through W4 because converting *into*
//! rosbag2 needs a writer, not just the reader `bag info` used at the
//! time. The `astrs-rosbag` wave gave it both a `.db3` writer and
//! `.arec ⇄ bag` conversion, so `bag convert` now dispatches to
//! [`crate::command::bag::convert`] as well, and `bag info` was extended
//! to read `.db3`/`.mcap` too, not just `.arec`.
//!
//! `ros2 doctor` and `ros2 topics` were the last entries. The ROS 2 interop
//! wave (`astrs-rtps`/`astrs-ros2`) landed, and both now spin a real probe
//! participant through [`crate::command::ros2`] — so the table emptied in
//! the same change that wired them up, which is the rule this module's own
//! docs state.
//!
//! Two limits inside those implementations are reported as ordinary
//! argument errors rather than from here, because the verb does run:
//! `astrs replay` requires `--into <manifest.yml>` (replaying straight into
//! a *running* dataflow is not implemented), and `astrs run --deterministic`
//! is refused before anything starts rather than producing an ordinary run
//! wearing a deterministic label.
//!
//! Naming the wave in the error is the point: a user who types a verb the
//! `--help` output advertises deserves to know *when* it arrives, not just
//! that it is missing, and a script can tell this apart from an ordinary
//! failure by [`crate::error::EXIT_UNAVAILABLE`].
use Write;
use crateCliError;
/// The example wave string [`crate::error::CliError::NotImplementedYet`]'s
/// own docs cite. No verb in [`STUBBED_VERBS`] waits on it any more — the
/// `astrs-rosbag` wave gave `bag convert` (the sole verb that used to)
/// its real implementation — but the constant is kept rather than
/// removed, since a future crate this build still predates may need
/// exactly this shape again, and `error.rs`'s doctest-adjacent example
/// keeps citing it as a realistic-looking wave label.
pub const WAVE_BAG: &str = "the `astrs-rosbag` wave";
/// The wave that owned the ROS 2 interop stack.
///
/// Kept for the same reason as [`WAVE_BAG`]: `ros2 doctor`/`ros2 topics`
/// were its last two entries and both now have implementations, but the
/// label is the realistic-looking example this module's docs and tests
/// cite.
pub const WAVE_ROS2: &str = "the ROS 2 interop wave (`astrs-rtps`/`astrs-ros2`)";
/// Every verb `crate::dispatch` still routes here, with the wave that owns it.
///
/// **Empty.** This is the authoritative table: [`wave_for`] reads it, the
/// module documentation mirrors it, and a verb that gains an implementation
/// must leave here in the same change that wires it up. Every §17 verb has
/// one, so nothing is listed.
pub const STUBBED_VERBS: = ;
/// The wave a not-yet-implemented verb belongs to.
///
/// An unknown verb name (a caller mistake, since every string passed here
/// is a literal in [`crate::dispatch`]) is reported as belonging to a later
/// wave rather than claiming a specific one — the honest answer when the
/// table has no entry. A verb that *used* to be stubbed and now has an
/// implementation falls into that case too, and never reaches this function.
/// Report that `verb` is not implemented in this build, naming the wave it
/// is scheduled for.
///
/// # Errors
///
/// Always returns [`CliError::NotImplementedYet`].