Skip to content

Drop unused Rust build dependencies from Linux CI - #135

Merged
puddly merged 3 commits into
puddly:devfrom
TheJulianJES:tjj/ci-linux-no-rust
Oct 12, 2026
Merged

puddly merged 3 commits into
puddly:devfrom
TheJulianJES:tjj/ci-linux-no-rust

Conversation

@TheJulianJES

@TheJulianJES TheJulianJES commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

This PR removes unused Rust build dependencies from the Linux CI, as they're no longer needed after #128.

Now, the Rust extension is only built on Windows and macOS, so the Rust toolchain, libudev-dev, and PYO3_USE_ABI3_FORWARD_COMPATIBILITY can theoretically be removed for Linux. The explicit install of setuptools-rust is also dropped, as it's now part of the dev dependency group (which uv sync also installs by default, though not yet used by CI).

Do note that this is optional and perhaps not something that's wanted (e.g. in case the extension should ever be built on Linux again). If so, this PR can just be closed – it was just one of the leftovers from all previous CI related PRs.

Also note that the temporary commit will be removed/reverted in a bit. It's only needed to ensure that CI still passes, but as we don't change cache keys with just the first commit, the old cache would be restored instead. If the PR is merged (without the temporary commit), the cache should perhaps just be deleted manually once, so all future commits and PRs would use the new setup.

Detailed PR description

AI-generated PR description (CLICK TO EXPAND)

Summary of changes

  • prepare-base: drop the Set up Rust and libudev-dev steps, the explicit setuptools-rust install (it's in the dev group since Add setuptools-rust to dev #133) and PYO3_USE_ABI3_FORWARD_COMPATIBILITY.
  • prek, pytest, pytest-esphome: drop libudev-dev.

Details

After #128, setup.py only adds the Rust extension when building for Windows or macOS, and setuptools-rust is only a build requirement there. On Linux, uv pip install -e . --group dev builds a pure-Python package without invoking cargo. The Linux CI setup still had everything the old Linux Rust build needed:

  • Rust toolchain (Set up Rust in prepare-base): unused by the venv build now. The prek job's cargo fmt/check/clippy hooks never depended on it, since they run in a separate job using the runner's preinstalled Rust.
  • setuptools-rust in the explicit uv pip install -U ...: not needed for the build, and still installed through the dev group (Add setuptools-rust to dev #133), which mypy needs for setup.py.
  • PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1: only relevant when compiling PyO3 against a newer Python than it supports.
  • libudev-dev in prepare-base, prek, pytest and pytest-esphome: it was added together with the Linux Rust build. The crate has no Linux-specific dependencies any more. libudev only shows up in Cargo.lock via the Windows-only serialport dependency, and cargo tree --target x86_64-unknown-linux-gnu doesn't include it. The Python side doesn't use libudev either (serialx/udev.py is pure Python, and port listing reads sysfs).

macOS and Windows are unchanged, since they still build the extension.

Testing

This PR doesn't change any cache key, so prepare-base restores the venv cached on dev and skips the edited steps. To exercise them, the cache keys can be bumped in a temporary commit and reverted afterwards, like in #129.

Related:

Since the Rust extension is only built on Windows and macOS, the Linux venv
no longer needs a Rust toolchain, `setuptools-rust` (already part of the
`dev` group for type checking) or `PYO3_USE_ABI3_FORWARD_COMPATIBILITY`.
`libudev-dev` was only needed by the Rust build and the crate no longer has
any Linux dependencies.
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.36%. Comparing base (842c116) to head (cfadc58).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #135   +/-   ##
=======================================
  Coverage   94.36%   94.36%           
=======================================
  Files          25       25           
  Lines        4362     4362           
=======================================
  Hits         4116     4116           
  Misses        246      246           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TheJulianJES
TheJulianJES marked this pull request as ready for review October 12, 2026 23:26
@puddly
puddly merged commit fc11b40 into puddly:dev Oct 12, 2026
31 checks passed
@TheJulianJES
TheJulianJES deleted the tjj/ci-linux-no-rust branch October 13, 2026 00:14
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.

2 participants