-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix several warnings and reduce Rust target clobbering #1069
Conversation
A new doc preview is ready to view. |
A new generated diff is ready to view.
|
A new doc preview is ready to view. |
A new generated diff is ready to view.
|
* Rustdoc doesn't support `r#` for raw identifiers. | ||
* This function adjusts doc links to refer to raw identifiers directly. | ||
*/ | ||
fun docLink(docLink: String): String = docLink.replace("::r##", "::").replace("::r#", "::") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there may be other places where we make doc links that need to be audited (but maybe those aren't dynamic?)
Nevermind, looks like you got em
A new doc preview is ready to view. |
A new generated diff is ready to view.
|
Motivation and Context
The protocol test output had several warnings in it, one of which was called out in #1040. Additionally, local development has involved a lot of recompiling of Rust dependencies lately due to clobbering of the
target/
directory due to Gradle targets invoking Rust with different compiler flags.This PR addresses both issues and stops short of disallowing warnings from Rustdoc, which isn't quite possible until we implement #1068.
These changes should also make the license header lint run faster since it will recompile the tool less frequently.
Note: One protocol test Rustdoc warning is left in place since it didn't seem worth the effort to fix right now. This is a warning about the
crate::model
module not existing. There's a doc link to this module, but the module doesn't get generated if there are no structs or enums that would be placed in it (which is determined by the Smithy model). We could fix this by always producing an empty module in the future.Testing
codegen-test:check
followed byaws:sdk:assemble
followed bycodegen-test:check
and verified that it didn't recompile all dependencies for the lastcodegen-test:check
invocation.Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.