smithy-rs/codegen-server-test
david-perez fbde9d8700
Do not set `RUSTFLAGS` environment variable when invoking Cargo commands via Gradle tasks (#3678)
Otherwise, if you generate a crate and compile it using Gradle, like for
example using the invocation:

```
./gradlew -P modules='simple' -P cargoCommands='test' codegen-server-test:build
```

And then manually run a `cargo` command within the generated crate
directory, or open the project using `rust-analyzer`, Cargo will
re-compile the project from scratch, with
`CARGO_LOG=cargo::core::compiler::fingerprint=trace` reporting that
flags have changed since the last compilation.

Instead, it's best if we persist these flags to `.cargo/config.toml`, so
all `cargo` invocations, either through Gradle, manually, or through
`rust-analyzer`, use the same set. This way, if no files were changed,
subsequent compilations since code generation will truly be no-ops, with
Cargo reusing all artifacts.

Note this commit fixes a regression that was introduced when `--cfg
aws_sdk_unstable` was introduced in #2614, since I fixed this the first
time back in #1422.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-06-21 14:26:22 +00:00
..
python Do not set `RUSTFLAGS` environment variable when invoking Cargo commands via Gradle tasks (#3678) 2024-06-21 14:26:22 +00:00
typescript Do not set `RUSTFLAGS` environment variable when invoking Cargo commands via Gradle tasks (#3678) 2024-06-21 14:26:22 +00:00
.gitignore [POC] Basic server type serde for RestJson1 (#737) 2021-10-05 13:05:00 -04:00
README.md Establish the `codegen-core` module (#1697) 2022-09-07 09:31:46 -07:00
build.gradle.kts Do not set `RUSTFLAGS` environment variable when invoking Cargo commands via Gradle tasks (#3678) 2024-06-21 14:26:22 +00:00

README.md

Server Codegen Integration Tests

Refer to ../codegen-client-test/README.md for documentation on how to use this module. This module is analogous to the codegen-client-test one, but it's named codegen-server-test and it runs the rust-server-codegen Smithy build plugin instead.