Client Crate Reorganization Upgrade Guidance #2449
jdisanti
announced in
Change Log
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Generated clients now follow a new module organization scheme by default, but it is possible to turn this new scheme off via the
smithy-build.jsonusing theenableNewCrateOrganizationSchemecodegen flag, as shown below:{ "version": "1.0", "plugins": { "rust-client-codegen": { "codegen": { "enableNewCrateOrganizationScheme": false }, "service": "...", "module": "...", "moduleVersion": "...", "moduleDescription": "...", "moduleAuthors": ["..."] } } }To upgrade, it is recommended to first disable the new organization scheme, fix all the compiler errors from other breaking changes that came with this release, and then enable it again to adopt the new scheme.
If you are using an IDE, the easiest way to upgrade will be to delete all imports from your generated client, and use the IDE features to automatically re-import the types. Otherwise, consider running
rustdocagainst the generated client and searching the docs to find the new module for any given type that fails to resolve.Specific changes:
crate::types=>crate::primitivescrate::model=>crate::typesXyzInput,XyzOutput,XyzError=>crate::operation::xyz::{XyzInput, XyzOutput, XyzError}crate::errorhave moved tocrate::types::errorBeta Was this translation helpful? Give feedback.
All reactions