Skip to content

CI: Surface Rust warnings on PRs that touch any Rust code #14173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Aug 11, 2025

Idea is, if you create PRs touching Rust code often, you probably don't
mind being shown new warnings introduced in new Rust releases. They've
been trivial to fix and this will help us stay on top of them.

Closes Shopify#693

@XrXr XrXr force-pushed the show-rust-warnings-on-prs branch 6 times, most recently from fabf5f8 to 68ba824 Compare August 11, 2025 22:26
@XrXr
Copy link
Member Author

XrXr commented Aug 11, 2025

Rust PRs will have a failed CI step if they trigger any warnings.
This helps us stay on top of warnings from new Rust releases and
also ones we accidentally write.

Fix a typo for demo, since this only runs when Rust files are changed.

Since we're clean on warnings on master right now, the check passes. See Shopify#693 for how it looks like when the check fails.

@XrXr XrXr marked this pull request as ready for review August 11, 2025 22:30
@matzbot matzbot requested a review from a team August 11, 2025 22:30
Rust PRs will have a failed CI step if they trigger any warnings.
This helps us stay on top of warnings from new Rust releases and
also ones we accidentally write.

Fix a typo for demo, since this only runs when Rust files are changed.
@XrXr XrXr force-pushed the show-rust-warnings-on-prs branch from 68ba824 to 27df91c Compare August 11, 2025 22:55
@XrXr XrXr enabled auto-merge (rebase) August 11, 2025 22:59
Copy link

launchable-app bot commented Aug 11, 2025

Tests Failed

✖️no tests failed ✔️62276 tests passed(2 flakes)

@XrXr XrXr merged commit 8b1afbc into ruby:master Aug 12, 2025
90 of 94 checks passed
@XrXr XrXr deleted the show-rust-warnings-on-prs branch August 12, 2025 00:51
- name: Rust warnings
run: |
set -euo pipefail
cargo check --quiet --all-features --message-format=json \
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there's a way to extract not only warnings but also errors with jq. It just silently fails right now.

Screenshot 2025-08-15 at 09 14 35

https://github.com/ruby/ruby/actions/runs/16994039992/job/48180380659

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.

3 participants