Skip to content

refactor(test/mock-bin): extract generic environment variable echo option - #5064

Merged
rami3l merged 3 commits into
rust-lang:mainfrom
rami3l:test/mock-bin-echo
Sep 8, 2026
Merged

refactor(test/mock-bin): extract generic environment variable echo option#5064
rami3l merged 3 commits into
rust-lang:mainfrom
rami3l:test/mock-bin-echo

Conversation

@rami3l

@rami3l rami3l commented Sep 8, 2026

Copy link
Copy Markdown
Member

This PR is mainly cherry-picked from #5056 as suggested in #5056 (comment).

Also, since my project goal prototype branch will be modifying dist files a lot, I've used this opportunity to clean up the imports in dist as well.

@rami3l
rami3l requested a review from djc September 8, 2026 09:22
@rami3l
rami3l force-pushed the test/mock-bin-echo branch from 097153d to f217932 Compare September 8, 2026 09:26
@djc

djc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

In rustls we enforce format style in CI by using nightly clippy:

https://github.com/rustls/rustls/blob/main/.github/workflows/build.yml#L392

Maybe that could make sense for rustup?

@rami3l
rami3l enabled auto-merge September 8, 2026 09:45
@rami3l

rami3l commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

In rustls we enforce format style in CI by using nightly clippy:

@djc If you mean nightly rustfmt, that'd be a more systematic solution indeed and I use something similar for my own projects. However it may break from time to time, probably due to other options I've been using at the same time.

Regarding the following minimal .rustfmt.unstable.toml that I propose below however, would it be stable enough according to your experience?

unstable_features = true

group_imports = "StdExternalCrate"
imports_granularity = "Crate"

@rami3l
rami3l disabled auto-merge September 8, 2026 09:52
@rami3l
rami3l added this pull request to the merge queue Sep 8, 2026
@rami3l

rami3l commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

The key here is that we don't want the CI to break way too frequently which may slow down both merging and releases. But otherwise, having a consistent style everywhere would be super cool, I agree.

@djc

djc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor
group_imports = "StdExternalCrate"
imports_granularity = "Crate"

Yes, these have been very stable IME.

(I don't think you need unstable_features if you run nightly with these?)

Merged via the queue into rust-lang:main with commit 6a21fc9 Sep 8, 2026
31 checks passed
@rami3l
rami3l deleted the test/mock-bin-echo branch September 8, 2026 10:22
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.

3 participants