Skip to content

build: deny warnings in .cargo/config.toml and CI - #132

Closed
google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/deny-warnings-in-cargo-config-jm1-f22a0bf9-e8f6-4df9-bc3e-b5aad8de0efc
Closed

google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/deny-warnings-in-cargo-config-jm1-f22a0bf9-e8f6-4df9-bc3e-b5aad8de0efc

Conversation

@google-labs-stitch

Copy link
Copy Markdown
Contributor

Summary

This pull request adds .cargo/config.toml so workspace cargo build, cargo doc and npm run check:wasm fail with exit code 101 on compiler and rustdoc warnings without extra command flags. It keeps the crate lints in src/lib.rs unchanged and keeps .cargo/config.toml out of the crates.io package and docs.rs builds.

Changes

  • Add .cargo/config.toml with rustflags = ["-D", "warnings"] and rustdocflags = ["-D", "warnings"] under [build].
  • Keep Cargo.toml (include, test = false and doctest = false), src/lib.rs and .github/workflows/release.yml unchanged.
  • Set RUSTFLAGS: "-D warnings" on cargo build --locked --release in .github/workflows/ci.yml to match RUSTDOCFLAGS: "-D warnings" on the documentation and Wasm check steps.
  • Document .cargo/config.toml and the RUSTFLAGS and RUSTDOCFLAGS shell override rule in AGENTS.md in ASD-STE100 style.

Verification

  • Validated .github/workflows/ci.yml and .github/workflows/release.yml with check-jsonschema and actionlint.
  • Ran cargo fmt --check, cargo clippy --locked --lib -- -D warnings, cargo build --locked --release, cargo doc --locked --no-deps, npm ci, npm run check:wasm and npm run verify:pack across Rust 1.100.0 and Rust 1.99.1.
  • Confirmed cargo package --list --locked exits 0 on clean HEAD and excludes .cargo/config.toml.
  • Confirmed in an isolated copy of the repository that unreachable_pub, rustdoc::bare_urls and rustdoc::invalid_html_tags probe warnings exit 101 without extra flags.

Automated PR initiated by user @byteland-app via Stitch Loop.

- Add .cargo/config.toml to set -D warnings for rustc and rustdoc
- Set RUSTFLAGS="-D warnings" on cargo build in ci.yml
- Add .cargo/config.toml to the repository map in AGENTS.md
- Document shell RUSTFLAGS and RUSTDOCFLAGS overrides in AGENTS.md
@byteland-app

Copy link
Copy Markdown
Contributor

Closing this PR. Putting -D warnings in .cargo/config.toml disrupts local WIP builds and risks breaking future stable Rust builds in release.yml. Prefer script/CI-level warning flags as in #131.

@byteland-app
byteland-app deleted the stitch/deny-warnings-in-cargo-config-jm1-f22a0bf9-e8f6-4df9-bc3e-b5aad8de0efc branch November 25, 2026 08:03
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Understood. This pull request remains closed with no further changes on this branch, because #131 tracks -D warnings in scripts and CI without .cargo/config.toml.

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