Skip to content

Fix Ubuntu CI: X11 tablet clippy + cargo-deny wildcard/license - #1

Merged
AberrantWolf merged 1 commit into
mainfrom
ci/ubuntu-clippy-and-deny-fixes
Apr 25, 2026
Merged

AberrantWolf merged 1 commit into
mainfrom
ci/ubuntu-clippy-and-deny-fixes

Conversation

@AberrantWolf

Copy link
Copy Markdown
Owner

Summary

  • Fix all Ubuntu clippy 1.95 errors in the X11 tablet backend (doc_markdown, cast_possible_truncation, struct_field_names, needless_pass_by_value, cast_lossless, map_unwrap_or). Mac clippy didn't catch these because the file is gated to cfg(target_os = "linux").
  • Mark the internal aj-* and aj-convert crates publish = false so cargo-deny's allow-wildcard-paths actually applies to their workspace path deps. stylus-junk stays publishable (it has no internal path deps).
  • Drop MPL-2.0 and Unicode-DFS-2016 from deny.toml's license allowlist — both were unmatched and noisy.

Plan-format notes

  • DRY: no duplication added; the idx = bit as u16 cast became a try_from with else { break } which keeps the loop early-exit pattern already used in the surrounding match.
  • Standards: clippy-clean on Ubuntu 1.95; pedantic exceptions all use #[expect(...)] with a reason = ... so future-self knows why each lint is suppressed.
  • UX: no user-visible change; clears CI red so subsequent feature work isn't blocked.
  • Future-self ergonomics: the publish = false pattern is the load-bearing fix — without it, every new internal crate that uses workspace = true deps would re-trip the wildcard ban.

Test plan

  • cargo fmt --all -- --check (clean locally)
  • cargo clippy --workspace --all-targets -- -D warnings (clean on macOS — Linux exercised via CI)
  • Ubuntu CI clippy green
  • Ubuntu / macOS / Windows build+test matrix green
  • cargo-deny job green

🤖 Generated with Claude Code

…go-deny which crates are internal

Ubuntu clippy (pedantic on 1.95) was stricter than Mac on the X11 tablet
backend:

- doc_markdown on XInput2 / XI_ProximityIn,Out
- cast_possible_truncation from Xlib c_ulong window XID down to x11rb's u32
  Window (29-bit in practice, but narrow via try_from to say so)
- struct_field_names on AxisAtoms (fields mirror X11 atom labels)
- needless_pass_by_value on pump_loop's Arc args (take by reference)
- cast_lossless on u8 -> DeviceId (u16) for proximity events
- cast_possible_truncation on usize -> u16 valuator index (bail via try_from)
- map_unwrap_or on three pressure / twist / tangential mappings
- cast_possible_truncation on f64 -> f32 of normalized [0,1] and bounded
  degree values in build_sample / compute_tilt (expect-attributed with
  reason)

cargo-deny on Ubuntu also failed: allow-wildcard-paths only applies to
non-publishable crates, so every workspace crate that uses path-only
workspace deps tripped the wildcard lint. Only stylus-junk is meant to be
publishable; mark all the aj-* and aj-convert crates publish = false.

Also drop MPL-2.0 and Unicode-DFS-2016 from the license allowlist — they
were flagged as unmatched allowances and nothing in the dep tree uses them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AberrantWolf
AberrantWolf merged commit 72d6d10 into main Apr 25, 2026
4 checks passed
@AberrantWolf
AberrantWolf deleted the ci/ubuntu-clippy-and-deny-fixes branch April 27, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant