smithy-rs
smithy-rs copied to clipboard
Deny warnings in generated crates
We already --deny warnings in:
- integration tests (crates generated by the
codegen-{core,client,server}-testGradle subprojects), {client,server}IntegrationTests; andRustWriter.compileAndTest, via theRUSTFLAGSwe bake in the CI Docker image (note though that we should delete usages ofRustWriter.compileAndTesthttps://github.com/smithy-lang/smithy-rs/issues/3193).
However, we do not deny warnings in TestWriterDelegator.compileAndTest; we generate crates with tests that have warnings.
It seems worthwhile to modify the tests so that they don't generate warnings to be consistent across the board. If a test can't be modified so as not to emit warnings, that specific test should opt-in into allowing warnings.
For the record, as of writing (cfd89422e639f53b380f8f99641df6792f7848d1), there's 210 tests in the server that fail to compile if we --deny warnings.
failing-tests.txt
We also generate crates with doc warnings (mostly broken links), but CI doesn't fail, despite us baking in RUSTDOCFLAGS="-D warnings" in the Docker image, because we clear RUSTDOCFLAGS in CodegenTestCommon.kt.