Skip to content

build: drop unused_crate_dependencies expectations - #1712

Merged
tamird merged 1 commit into
aya-rs:mainfrom
swananan:fix/pr-1709-nightly-lints
Sep 7, 2026
Merged

tamird merged 1 commit into
aya-rs:mainfrom
swananan:fix/pr-1709-nightly-lints

Conversation

@swananan

@swananan swananan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The daily Rust update is blocked by unfulfilled lint expectations. Cargo now collects dependency usage across targets 1, avoiding false positives for dependencies used elsewhere in the same package. The unused_crate_dependencies expectations are no longer needed.

Update the pinned Rust toolchains in the same commit so CI uses the new Cargo behavior. Removing the expectations with the old nightly would expose unused dependency warnings and fail Clippy.

Added/updated tests?

We strongly encourage you to add a test for your changes.

  • No

Checklist

  • Rust code has been formatted with cargo +nightly fmt.
  • All clippy lints have been fixed.
    You can find failing lints with cargo xtask clippy.
  • Unit tests are passing locally with cargo test.
  • The Integration tests are passing locally.
  • I have blessed any API changes with cargo xtask public-api --bless.

(Optional) What GIF best describes this PR or how it makes you feel?


This change is Reviewable

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 992213f
🔍 Latest deploy log https://app.netlify.com/projects/aya-rs-docs/deploys/6a9eab4743236300076083cd
😎 Deploy Preview https://deploy-preview-1712--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@swananan

swananan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

This PR solves #1709 build issue.

The daily Rust update is blocked by unfulfilled lint expectations.
Cargo now collects dependency usage across targets [1], avoiding
false positives for dependencies used elsewhere in the same package.
The unused_crate_dependencies expectations are no longer needed.

Update the pinned Rust toolchains in the same commit so CI uses the
new Cargo behavior. Removing the expectations with the old nightly
would expose unused dependency warnings and fail Clippy.

[1]: rust-lang/cargo#17298
@swananan
swananan force-pushed the fix/pr-1709-nightly-lints branch from 01a0965 to 992213f Compare September 7, 2026 12:17

@tamird tamird left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamird reviewed 59 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on swananan).

@tamird

tamird commented Sep 7, 2026

Copy link
Copy Markdown
Member

I'm surprised this works for both stable and nightly, but maybe I'm missing something (on mobile).

@swananan

swananan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Ah, got your point, that's because cargo xtask clippy only runs the nightly, so this change cannot work for the stable.

@tamird

tamird commented Sep 7, 2026

Copy link
Copy Markdown
Member

hmm but this is a rustc lint, right? don't we build with stable, or do we just get warnings there? I guess it's fine to tolerate warnings until this reaches stable

@swananan

swananan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Yes, just get warnings, so stable build only fails with RUSTFLAGS="-D warnings"

cargo +1.98.1 build --locked -p aya --tests

   Compiling proc-macro2 v1.0.107
   Compiling semver v1.0.28
   Compiling aho-corasick v1.1.4
   Compiling thiserror v2.0.19
   Compiling indexmap v2.14.0
   Compiling nix v0.31.3
   Compiling memoffset v0.9.1
   Compiling once_cell v1.21.4
   Compiling bytes v1.12.1
   Compiling tempfile v3.27.0
   Compiling rustc_version v0.4.1
   Compiling rstest_macros v0.26.1
   Compiling quote v1.0.47
   Compiling object v0.39.1
   Compiling syn v3.0.3
   Compiling syn v2.0.119
   Compiling regex-automata v0.4.14
   Compiling thiserror-impl v2.0.19
   Compiling regex v1.12.4
   Compiling aya-obj v0.3.0 (/mnt/500g/code/myaya1-pr-1709-nightly-fix/aya-obj)
   Compiling rstest v0.26.1
   Compiling aya v0.14.0 (/mnt/500g/code/myaya1-pr-1709-nightly-fix/aya)
warning: extern crate `nix` is unused in crate `aya`
  |
  = help: remove the dependency or add `use nix as _;` to the crate root
  = note: requested on the command line with `-W unused-crate-dependencies`

warning: `aya` (lib test) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.48s

@tamird
tamird merged commit 8f6b3c2 into aya-rs:main Sep 7, 2026
28 checks passed
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