Skip to content
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

Remove special handling logic for the old SDK examples directory layout #2810

Closed
jdisanti opened this issue Jun 26, 2023 · 0 comments · Fixed by #2961
Closed

Remove special handling logic for the old SDK examples directory layout #2810

jdisanti opened this issue Jun 26, 2023 · 0 comments · Fixed by #2961
Labels
ops Improves our operations and release process sdk

Comments

@jdisanti
Copy link
Collaborator

jdisanti commented Jun 26, 2023

Address the TODO(https://github.com/awslabs/smithy-rs/issues/2810) comments after confirming that there is no longer a Cargo.toml file in aws-sdk-rust/examples/ in the aws-sdk-rust main branch.

@jdisanti jdisanti added ops Improves our operations and release process sdk labels Jun 26, 2023
github-merge-queue bot pushed a commit that referenced this issue Jun 30, 2023
## 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._
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2023
Fixes #2810

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ops Improves our operations and release process sdk
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant