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

Add RUSTFLAGS = aws_sdk_unstable as environment variable when running Cargo from kotlin #2614

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

thomas-k-cameron
Copy link
Contributor

@thomas-k-cameron thomas-k-cameron commented Apr 21, 2023

Motivation and Context

This PR set aws_sdk_unstable to RUSTFALGS when running cargo from kotlin.

It is required to enable test gated features introduced on RFC30.

No breaking changers are introduced.

Description

add RUSTFLAGS = aws_sdk_unstable when running cargo from kotlin.

Parent PR

This PR is listed as one of prerequisite PRs on this PR.

Testing

NA.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@thomas-k-cameron thomas-k-cameron changed the title RFC30 buildSrc Add RUSTFLAGS = aws_sdk_unstable as environment variable when running Cargo from kotlin Apr 26, 2023
@thomas-k-cameron thomas-k-cameron marked this pull request as ready for review April 26, 2023 11:06
@thomas-k-cameron thomas-k-cameron requested review from a team as code owners April 26, 2023 11:06
@Velfi Velfi added this pull request to the merge queue Apr 26, 2023
Merged via the queue into smithy-lang:main with commit 9f10be0 Apr 26, 2023
@thomas-k-cameron thomas-k-cameron deleted the RFC30/kotlin-buildSrc branch April 28, 2023 04:38
david-perez pushed a commit that referenced this pull request May 18, 2023
…ng Cargo from kotlin (#2614)

## Motivation and Context
This PR set `aws_sdk_unstable` to RUSTFALGS when running cargo from
kotlin.

It is required to enable test gated features introduced on RFC30.

No breaking changers are introduced.

## Description
add `RUSTFLAGS = aws_sdk_unstable` when running cargo from kotlin.


## Parent PR
This PR is listed as one of prerequisite PRs on this PR.

- #2615

## Testing
NA.

----
*By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.*
david-perez pushed a commit that referenced this pull request May 22, 2023
…ng Cargo from kotlin (#2614)

## Motivation and Context
This PR set `aws_sdk_unstable` to RUSTFALGS when running cargo from
kotlin.

It is required to enable test gated features introduced on RFC30.

No breaking changers are introduced.

## Description
add `RUSTFLAGS = aws_sdk_unstable` when running cargo from kotlin.


## Parent PR
This PR is listed as one of prerequisite PRs on this PR.

- #2615

## Testing
NA.

----
*By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.*
david-perez pushed a commit that referenced this pull request May 22, 2023
…ng Cargo from kotlin (#2614)

## Motivation and Context
This PR set `aws_sdk_unstable` to RUSTFALGS when running cargo from
kotlin.

It is required to enable test gated features introduced on RFC30.

No breaking changers are introduced.

## Description
add `RUSTFLAGS = aws_sdk_unstable` when running cargo from kotlin.


## Parent PR
This PR is listed as one of prerequisite PRs on this PR.

- #2615

## Testing
NA.

----
*By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.*
david-perez added a commit that referenced this pull request Jun 3, 2024
…nds via Gradle tasks

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.
david-perez added a commit that referenced this pull request Jun 3, 2024
…nds via Gradle tasks

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.
github-merge-queue bot pushed a commit that referenced this pull request Jun 21, 2024
…nds 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._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants