-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Rust: refactor workspaces. #4997
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
Conversation
1b363cf
to
10d4f1b
Compare
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.
Editorial comments
10d4f1b
to
697c5a3
Compare
The project has a single main workspace, but this doesn't work for wasm or for lambda runtime. Rather than have those as one-offs, this refactor moves the cross-service, applications, and "other" pieces to dedicated top-level workspaces. Closes awsdocs#4996
b25e7f1
to
011243b
Compare
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.
Just one issue to fix that I found. But I also see a path in .doc_gen\readmes\config.py, does this need updating?:
'service_folder': 'rust_dev_preview/{{service["name"]}}',
## Motivation and Context When the WebAssembly SDK example was added some months ago, we changed the build process to make each SDK example its own Cargo workspace. This allowed the `.cargo/config.toml` that changed the compiler target to work correctly. However, this has led to other issues: dependency compilation is no longer shared between examples which greatly increases the time it takes for that CI step to run, and now it is even running out of disk space on the GitHub Actions runners. This PR adds support for a new workspace layout where the [`aws-doc-sdk-examples`](https://github.com/awsdocs/aws-doc-sdk-examples) repo gets to decide how the workspaces are logically grouped. If a `Cargo.toml` file exists at the example root, then the build system assumes that the _old_ "one example, one workspace" layout should be used. If there is no root `Cargo.toml`, then it assumes the new layout should be used. The `sdk-versioner` tool had to be adapted to support more complex relative path resolution to make this work, and the `publisher fix-manifests` subcommand had to be fixed to ignore workspace-only `Cargo.toml` files. The build system in this PR needs to work for both the old and new examples layout so that the `sdk-sync` process will succeed. #2810 has been filed to track removing the old example layout at a later date. [aws-doc-sdk-examples#4997](awsdocs/aws-doc-sdk-examples#4997) changes the workspace structure of the actual examples to the new one. ## Testing - [x] Generated a full SDK with the old example layout, manually examined the output, and spot checked that some examples compile - [x] Generated a full SDK with the new example layout, manually examined the output, and spot checked that some examples compile - [x] Examples pass in CI with the old example layout - [x] Examples pass in CI with the new example layout ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
The project has a single main workspace, but this doesn't work for wasm or for lambda runtime. Rather than have those as one-offs, this refactor moves the cross-service, applications, and "other" pieces to dedicated top-level workspaces.
Closes #4996
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.