Make the CI checks say what they mean, and format the workspace
The Android job's "Verify minimum API level" step has never verified the minimum API level. It took the first `*.so` anywhere under the target directory, which is a host proc-macro from debug/deps — an x86-64 object built by the runner's gcc, whose .comment section cannot mention Android and so can never contradict the expected value. It now reads the artifact under the target triple, compares against MIN_API parsed from the Dockerfile rather than a second copy of the number, and fails on a mismatch. Both sides are checked non-empty first: two failed parses would otherwise compare equal and pass, which is the same silent success in a new costume. The Android image installs one SDK package per layer and keeps the output. sdkmanager is a JVM program that aborts when it cannot get memory, and the single `> /dev/null` step reported that as a bare "exit code 134" while a retry re-downloaded everything that had already succeeded. tools/ci-local.sh runs all four jobs — desktop, android, layering, traceability — against the host toolchain, which is pinned to the same 1.92.0 CI installs. Its matrix check compares regeneration against the working tree rather than against HEAD: CI starts from a clean checkout, so git's answer is the right one there and reports every local run stale here. The rest is rustfmt across the workspace, and the clippy findings that surfaced once it did: manual_contains in dr-thumbs and collections_ui, a map iterated as pairs for its keys, an index loop over a slice, and two runtime assertions on a constant now made at compile time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+23
-9
@@ -491,20 +491,29 @@ impl DevelopSession {
|
||||
/// Mirror horizontally, about the frame's vertical centre line.
|
||||
pub fn toggle_flip_h(&mut self) {
|
||||
let (h, _) = self.graph.framing().flips();
|
||||
self.graph
|
||||
.set_param(dr_pipeline::framing::ID, dr_pipeline::framing::FLIP_H, f32::from(u8::from(!h)));
|
||||
self.graph.set_param(
|
||||
dr_pipeline::framing::ID,
|
||||
dr_pipeline::framing::FLIP_H,
|
||||
f32::from(u8::from(!h)),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn toggle_flip_v(&mut self) {
|
||||
let (_, v) = self.graph.framing().flips();
|
||||
self.graph
|
||||
.set_param(dr_pipeline::framing::ID, dr_pipeline::framing::FLIP_V, f32::from(u8::from(!v)));
|
||||
self.graph.set_param(
|
||||
dr_pipeline::framing::ID,
|
||||
dr_pipeline::framing::FLIP_V,
|
||||
f32::from(u8::from(!v)),
|
||||
);
|
||||
}
|
||||
|
||||
/// Set the straightening angle, in degrees.
|
||||
pub fn set_angle(&mut self, degrees: f32) {
|
||||
self.graph
|
||||
.set_param(dr_pipeline::framing::ID, dr_pipeline::framing::ANGLE, degrees);
|
||||
self.graph.set_param(
|
||||
dr_pipeline::framing::ID,
|
||||
dr_pipeline::framing::ANGLE,
|
||||
degrees,
|
||||
);
|
||||
}
|
||||
|
||||
/// Whether the framing currently changes the image — what lights the
|
||||
@@ -586,7 +595,11 @@ impl DevelopSession {
|
||||
/// Pan by a fraction of the *visible* area — what a drag reports.
|
||||
pub fn pan_by(&mut self, dx: f32, dy: f32) {
|
||||
let view = self.graph.framing().view();
|
||||
self.set_view_clamped(view.x + dx * view.width, view.y + dy * view.height, view.width);
|
||||
self.set_view_clamped(
|
||||
view.x + dx * view.width,
|
||||
view.y + dy * view.height,
|
||||
view.width,
|
||||
);
|
||||
}
|
||||
|
||||
/// Back to fitting the whole frame.
|
||||
@@ -923,8 +936,9 @@ mod tests {
|
||||
"group at {head} reaches past the model"
|
||||
);
|
||||
// Every row the group spans must agree it belongs to that group.
|
||||
for span in head..head + len {
|
||||
assert_eq!(rows[span].0, head, "row {span} disagrees about its group");
|
||||
for (offset, spanned) in rows[head..head + len].iter().enumerate() {
|
||||
let span = head + offset;
|
||||
assert_eq!(spanned.0, head, "row {span} disagrees about its group");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user