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

Get Unknown configuration option rust-version when running the rust format command #1240

Closed
HaoYang670 opened this issue Jan 26, 2022 · 4 comments · Fixed by #1262
Closed
Labels

Comments

@HaoYang670
Copy link
Contributor

Describe the bug
On my desktop, when I run the command

cargo +stable fmt --all -- --check

I always get the warning

Warning: Unknown configuration option `rust-version`

When I run the command

rustfmt --help=config

I could not find a configuration option called rust-version
I am not sure whether it is a bug or my problem.

To Reproduce
Run the command

cargo +stable fmt --all -- --check

Expected behavior
Remove the warning.

Additional context
Developer's guide to Arrow Rust.

@HaoYang670 HaoYang670 added the bug label Jan 26, 2022
@HaoYang670 HaoYang670 changed the title Get Unknown configuration option rust-version when running the rustfmt` Get Unknown configuration option rust-version when running the rust format command Jan 26, 2022
@HaoYang670
Copy link
Contributor Author

HaoYang670 commented Jan 27, 2022

Should we delete this line:
https://github.com/apache/arrow-rs/blob/master/rustfmt.toml#L19

I do not find the configuration rust-version in other project's rustfmt file, such as:
https://github.com/apache/arrow-datafusion/blob/master/rustfmt.toml

@HaoYang670
Copy link
Contributor Author

Does anyone meet the same problem?

@HaoYang670
Copy link
Contributor Author

@alamb Could you reproduce the problem?

@alamb
Copy link
Contributor

alamb commented Jan 30, 2022

Hi @HaoYang670 -- I do see the same problem and I agree with your assessment of the problem.

I had assumed it was related to not using nightly, but it happens for me with nightly and with stable rust.

cd /Users/alamb/Software/arrow-rs && CARGO_TARGET_DIR=/Users/alamb/Software/df-target cargo fmt
Warning: Unknown configuration option `rust-version`
Warning: Unknown configuration option `rust-version`
Warning: Unknown configuration option `rust-version`
cargo +nightly  fmt
Warning: Unknown configuration option `rust-version`
Warning: Unknown configuration option `rust-version`
Warning: Unknown configuration option `rust-version`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants