From 4f5eea68f64315d556353d8808a1c58ccb4829c5 Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Tue, 7 Oct 2025 10:55:51 +0200 Subject: [PATCH 1/5] Add CI test for building docs Generating docs for release 4.8.0 failed at docs.rs (https://docs.rs/crate/serialport/4.8.0/builds/2566488) and it turns out that we don't check for issues from generating docs in CI. --- .github/workflows/ci.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1c0d5ce8..35b7f30e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,25 @@ jobs: - name: Lint | clippy run: cargo clippy --all-targets --all-features + # -------------------------------------------------------------------------- + # Rustdoc + + doc: + name: documentation + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - name: documentation | install dependencies + run: | + sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list + sudo apt-get -qq update + sudo apt install -qq -y libudev-dev + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/install@cargo-docs-rs + - run: cargo docs-rs + # -------------------------------------------------------------------------- # Link checks From d050ae225d2e34c2d5eb4b93526d57b5da85700c Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Tue, 7 Oct 2025 11:32:22 +0200 Subject: [PATCH 2/5] Replace doc_auto_cfg with doc_cfg It looks like the issue with building the latest docs originated from https://github.com/rust-lang/rust/pull/138907 getting into effect at docs.rs. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1782c3b6..1158902b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,8 +27,8 @@ // https://doc.rust-lang.org/rustdoc/unstable-features.html?highlight=doc(cfg#doccfg-recording-what-platforms-or-features-are-required-for-code-to-be-present // and // https://doc.rust-lang.org/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg -// for details. -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +// with its latest update https://github.com/rust-lang/rust/pull/138907 for details. +#![cfg_attr(docsrs, feature(doc_cfg))] // Don't worry about needing to `unwrap()` or otherwise handle some results in // doc tests. #![doc(test(attr(allow(unused_must_use))))] From 56fd743b49a0aeef8121694f971e14fcfa182af1 Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Tue, 7 Oct 2025 11:58:30 +0200 Subject: [PATCH 3/5] Add changelog for fixing documentation builds at docs.rs --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb8e7017..457352d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,15 @@ project adheres to [Semantic Versioning](https://semver.org/). ### Fixed ### Removed + +## [4.8.1] - 2025-10-07i + +### Fixed + +* Generating documentation on docs.rs. + [#299](https://github.com/serialport/serialport-rs/pull/299) + + ## [4.8.0] - 2025-10-06 ### Added @@ -556,7 +565,8 @@ Unreleased, happened due to a user error using `cargo-release`. * Initial release. -[Unreleased]: https://github.com/serialport/serialport-rs/compare/v4.8.0...HEAD +[Unreleased]: https://github.com/serialport/serialport-rs/compare/v4.8.1...HEAD +[4.8.1]: https://github.com/serialport/serialport-rs/compare/v4.8.0...v4.8.1 [4.8.0]: https://github.com/serialport/serialport-rs/compare/v4.7.3...v4.8.0 [4.7.3]: https://github.com/serialport/serialport-rs/compare/v4.7.2...v4.7.3 [4.7.2]: https://github.com/serialport/serialport-rs/compare/v4.7.1...v4.7.2 From aa1a3da8f6705bff670c7c5d61d047072745be9c Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Tue, 7 Oct 2025 11:58:59 +0200 Subject: [PATCH 4/5] Release 4.8.1 This is a quick follow-up to 4.8.0 git have up-to-date docs on docs.rs again. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a6f28187..ca715d6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serialport" -version = "4.8.1-alpha.0" +version = "4.8.1" authors = [ "Bryant Mairs ", "Jesse Braham ", From 1bf8156f226a7a6b61558d014aac71d620f70ddb Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Tue, 7 Oct 2025 12:00:58 +0200 Subject: [PATCH 5/5] Bump version after release --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ca715d6f..836f6e7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serialport" -version = "4.8.1" +version = "4.8.2-alpha.0" authors = [ "Bryant Mairs ", "Jesse Braham ",