2020-10-28 23:01:13 +08:00
|
|
|
#
|
|
|
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2022-05-09 22:50:46 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2020-10-28 23:01:13 +08:00
|
|
|
#
|
2022-01-25 07:12:35 +08:00
|
|
|
# Rust MSRV (entered into the generated README)
|
Upgrade MSRV to 1.78.0 (#3800)
## Motivation and Context
Upgrades MSRV to 1.78.0 since the [latest
Rust](https://www.rust-lang.org/) at the time of writing is 1.80.1 (we
try keeping [two releases
behind](https://github.com/awslabs/aws-sdk-rust?tab=readme-ov-file#supported-rust-versions-msrv)).
## Description
In Rust 1.78.0, `clippy` enforces stricter checks in two areas:
- `dead_code`
It seems to be able to uncover more unused code patterns, especially
when different combinations of cargo features are enabled
- `empty_docs`
Prior to 1.78.0, the codegen used to render the following empty docs
`///`, regardless whether the codegen is for the server or for the
client. This is now flagged as `empty_docs` by `clippy`:
```
///
pub(crate) mod XXX {
...
}
```
Other than bumping MSRV to 1.78.0, the remaining code changes address
issues related to the fixes mentioned above.
**EDIT:**
`cargo-semver-checks` required an upgrade due to incompatibility issues
following the MSRV upgrade ([example
error](https://github.com/smithy-lang/smithy-rs/actions/runs/10534205294/job/29261105195#step:4:2068)).
Specifically, after updating the MSRV to 1.78.0, the rustdoc version was
upgraded to v28. However, the version of `cargo-semver-checks` we were
using (0.24.1) only supported rustdoc [up to
v27](https://github.com/obi1kenobi/cargo-semver-checks/blob/4bce03d4a6a32cf651b9eccddb40e3418dc2c154/Cargo.toml#L18).
To resolve this, we have updated `cargo-semver-checks` to the first
version that supports rustdoc
[v28](https://github.com/obi1kenobi/cargo-semver-checks/blob/94a491f0854f0bdbccbb301099db119201bff181/Cargo.toml#L18).
## Testing
Existing tests in CI
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-08-27 23:30:40 +08:00
|
|
|
rust.msrv=1.78.0
|
2023-02-11 09:36:48 +08:00
|
|
|
# To enable debug, swap out the two lines below.
|
|
|
|
# When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon.
|
|
|
|
# org.gradle.jvmargs=-Xmx1024M -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5006
|
2022-05-27 23:18:17 +08:00
|
|
|
org.gradle.jvmargs=-Xmx1024M
|
Update release tooling to handle both stable and unstable crates (#3082)
## Motivation and Context
This PR updates our smithy-rs release tooling to prepare for handling
both stable and unstable crates. Merging this PR to `main` does not make
any of the runtime crates stable, instead we will just have a supporting
mechanism in place, ready to be turned on by implementing `TODO(GA)`.
## Description
At a high level, this PR will
- update the `Release smithy-rs` workflow UI to have an additional input
`Stable semantic version`:
![Screenshot 2023-10-24 at 10 19 07
PM](https://github.com/awslabs/smithy-rs/assets/15333866/097502e6-3193-43f6-b39b-dd231c2d14d7)
- split an existing gradle property `smithy.rs.runtime.crate.version`
into `smithy.rs.runtime.crate.stable.version` and
`smithy.rs.runtime.crate.unstable.version`.
- make `publisher upgrade-runtime-crates-version` take a new, optional
(for backwards compatibility) command line argument `--stable-version`
to use the said gradle property
`smithy.rs.runtime.crate.stable.version`. This will allow the
`publisher` to set a value passed via a workflow input `Stable semantic
version` to `smithy.rs.runtime.crate.stable.version` in
`gradle.properties` (and the same goes for unstable crates).
- update `fixRuntimeCrateVersions` so that it fixes up runtime crate
versions based on properties `smithy.rs.runtime.crate.stable.version`
and `smithy.rs.runtime.crate.unstable.version`.
**NOTE**
There is a guard in place. When this PR gets merged and then we enter a
stable crate version in the `Stable semantic version` text box, it will
be overwritten by a version in `Unstable semantic version`, so that
1.x.y version will NOT be published to `crates.io` before GA and that
also replicates today's release workflow's behavior (only publishing
unstable crates). Just make sure we specify a 0.x.y in the `Untable
semantic version` text box because that does get shipped.
### What happens once `TODO(GA)` has been implemented?
Roughly, it will look like this. When we run the `Release smithy-rs`
workflow (not a dry-run), providing a stable version (say 1.0.0) and a
unstable version (say 0.57.0) in the workflow text boxes,
1. the workflow will create a new release branch
`smithy-rs-release-1.x.y`.
2. the workflow will set 1.0.0 to
`smithy.rs.runtime.crate.stable.version` and 0.57.0 to
`smithy.rs.runtime.crate.unstable.version` in `gradle.properties`.
3. for whatever smithy runtime crates whose package metadata says
```
[package.metadata.smithy-rs-release-tooling]
stable = true
```
their `Cargo.toml` will include `version = 1.0.0` (and `version =
0.57.0` if `smithy-rs-release-tooling` is not specified or if its value
is `stable = false`).
4. the workflow will publish smithy runtime crates accordingly to
`crates.io`.
5. releasing `aws-sdk-rust` subsequently will render `version = 1.0.0`
in `Cargo.toml` for stable AWS runtime crates (again as specified by
`smithy-rs-release-tooling`), will render `version = 1.1.0` for SDK
crates (we will not go into details here as to why it's not `1.0.0`),
and will publish those crates to `crates.io`.
## Testing
In a [separate
branch](https://github.com/awslabs/smithy-rs/tree/ysaito/stable-and-unstable-crates)
that implemented `TODO(GA)`, I verified that
- our internal release pipeline was executed without errors
- a generated AWS SDK had following manifests (showing excerpts from
arbitrary crates)
```
[package]
name = "aws-sdk-s3"
version = "1.1.0"
```
```
[package]
name = "aws-smithy-types"
version = "1.0.0"
```
```
[package]
name = "aws-smithy-http"
version = "0.57.0"
```
```
[package]
name = "aws-types"
version = "1.0.0"
```
```
[package]
name = "aws-config"
version = "1.0.0"
```
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-11-08 12:03:46 +08:00
|
|
|
# Version number to use for the generated stable runtime crates
|
2024-02-23 06:34:09 +08:00
|
|
|
smithy.rs.runtime.crate.stable.version=1.1.7
|
Update release tooling to handle both stable and unstable crates (#3082)
## Motivation and Context
This PR updates our smithy-rs release tooling to prepare for handling
both stable and unstable crates. Merging this PR to `main` does not make
any of the runtime crates stable, instead we will just have a supporting
mechanism in place, ready to be turned on by implementing `TODO(GA)`.
## Description
At a high level, this PR will
- update the `Release smithy-rs` workflow UI to have an additional input
`Stable semantic version`:
![Screenshot 2023-10-24 at 10 19 07
PM](https://github.com/awslabs/smithy-rs/assets/15333866/097502e6-3193-43f6-b39b-dd231c2d14d7)
- split an existing gradle property `smithy.rs.runtime.crate.version`
into `smithy.rs.runtime.crate.stable.version` and
`smithy.rs.runtime.crate.unstable.version`.
- make `publisher upgrade-runtime-crates-version` take a new, optional
(for backwards compatibility) command line argument `--stable-version`
to use the said gradle property
`smithy.rs.runtime.crate.stable.version`. This will allow the
`publisher` to set a value passed via a workflow input `Stable semantic
version` to `smithy.rs.runtime.crate.stable.version` in
`gradle.properties` (and the same goes for unstable crates).
- update `fixRuntimeCrateVersions` so that it fixes up runtime crate
versions based on properties `smithy.rs.runtime.crate.stable.version`
and `smithy.rs.runtime.crate.unstable.version`.
**NOTE**
There is a guard in place. When this PR gets merged and then we enter a
stable crate version in the `Stable semantic version` text box, it will
be overwritten by a version in `Unstable semantic version`, so that
1.x.y version will NOT be published to `crates.io` before GA and that
also replicates today's release workflow's behavior (only publishing
unstable crates). Just make sure we specify a 0.x.y in the `Untable
semantic version` text box because that does get shipped.
### What happens once `TODO(GA)` has been implemented?
Roughly, it will look like this. When we run the `Release smithy-rs`
workflow (not a dry-run), providing a stable version (say 1.0.0) and a
unstable version (say 0.57.0) in the workflow text boxes,
1. the workflow will create a new release branch
`smithy-rs-release-1.x.y`.
2. the workflow will set 1.0.0 to
`smithy.rs.runtime.crate.stable.version` and 0.57.0 to
`smithy.rs.runtime.crate.unstable.version` in `gradle.properties`.
3. for whatever smithy runtime crates whose package metadata says
```
[package.metadata.smithy-rs-release-tooling]
stable = true
```
their `Cargo.toml` will include `version = 1.0.0` (and `version =
0.57.0` if `smithy-rs-release-tooling` is not specified or if its value
is `stable = false`).
4. the workflow will publish smithy runtime crates accordingly to
`crates.io`.
5. releasing `aws-sdk-rust` subsequently will render `version = 1.0.0`
in `Cargo.toml` for stable AWS runtime crates (again as specified by
`smithy-rs-release-tooling`), will render `version = 1.1.0` for SDK
crates (we will not go into details here as to why it's not `1.0.0`),
and will publish those crates to `crates.io`.
## Testing
In a [separate
branch](https://github.com/awslabs/smithy-rs/tree/ysaito/stable-and-unstable-crates)
that implemented `TODO(GA)`, I verified that
- our internal release pipeline was executed without errors
- a generated AWS SDK had following manifests (showing excerpts from
arbitrary crates)
```
[package]
name = "aws-sdk-s3"
version = "1.1.0"
```
```
[package]
name = "aws-smithy-types"
version = "1.0.0"
```
```
[package]
name = "aws-smithy-http"
version = "0.57.0"
```
```
[package]
name = "aws-types"
version = "1.0.0"
```
```
[package]
name = "aws-config"
version = "1.0.0"
```
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-11-08 12:03:46 +08:00
|
|
|
# Version number to use for the generated unstable runtime crates
|
2024-02-23 06:34:09 +08:00
|
|
|
smithy.rs.runtime.crate.unstable.version=0.60.6
|
2020-10-28 23:01:13 +08:00
|
|
|
kotlin.code.style=official
|
|
|
|
# codegen
|
2024-02-08 06:18:49 +08:00
|
|
|
smithyGradlePluginVersion=0.9.0
|
2024-10-24 23:53:18 +08:00
|
|
|
smithyVersion=1.52.0
|
Allow 'null' variants in unions (#3481)
## Motivation and Context
- https://github.com/awslabs/aws-sdk-rust/issues/1095
## Description
Update the JSON parser generator to allow for `null` to be set in
unions. Servers can send unions like this:
```json
{
"AmazonElasticsearchParameters": null,
"AmazonOpenSearchParameters": null,
"AppFlowParameters": null,
"AthenaParameters": null,
"AuroraParameters": null,
"AuroraPostgreSqlParameters": null,
"AwsIotAnalyticsParameters": null,
"BigQueryParameters": null,
"DatabricksParameters": null,
"Db2Parameters": null,
"DenodoParameters": null,
"DocumentDBParameters": null,
"DremioParameters": null,
"ExasolParameters": null,
"GoogleAnalyticsParameters": null,
"JiraParameters": null,
"MariaDbParameters": null,
"MongoAtlasParameters": null,
"MongoDBParameters": null,
"MySqlParameters": null,
"OracleParameters": null,
"PostgreSqlParameters": null,
"PrestoParameters": null,
"RdsParameters": null,
"RedshiftParameters": null,
"S3Parameters": {
"IsUploaded": false,
"ManifestFileLocation": {
"Bucket": "deided-bucket.prod.us-east-1",
"Key": "sales/manifest.json"
},
"RoleArn": null
},
"SalesforceParameters": null,
"SapHanaParameters": null,
"ServiceNowParameters": null,
"SnowflakeParameters": null,
"SparkParameters": null,
"SqlServerParameters": null,
"StarburstParameters": null,
"TeradataParameters": null,
"TrinoParameters": null,
"TwitterParameters": null
}
```
This caused our parser to fail.
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
- [x] New unit test
- [x] Dry run against new [smithy protocol
test](https://github.com/smithy-lang/smithy/pull/2180)
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-03-16 06:36:42 +08:00
|
|
|
allowLocalDeps=false
|
2020-10-28 23:01:13 +08:00
|
|
|
# kotlin
|
2023-12-15 04:35:18 +08:00
|
|
|
kotlinVersion=1.9.20
|
2020-10-28 23:01:13 +08:00
|
|
|
# testing/utility
|
2023-12-15 04:35:18 +08:00
|
|
|
ktlintVersion=1.0.1
|
|
|
|
kotestVersion=5.8.0
|
2022-12-21 01:13:31 +08:00
|
|
|
# Avoid registering dependencies/plugins/tasks that are only used for testing purposes
|
|
|
|
isTestingEnabled=true
|