Skip to content

Example Travis config in README does not work #2688

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

Closed
davidalber opened this issue May 8, 2018 · 4 comments
Closed

Example Travis config in README does not work #2688

davidalber opened this issue May 8, 2018 · 4 comments

Comments

@davidalber
Copy link
Contributor

#2683 changed the README Travis config example to use --write-mode=check instead of --write-mode=diff. That's not currently working in Travis. See this build, for example.

$ cargo fmt --all -- --write-mode=check
Invalid write-mode: check

The command "cargo fmt --all -- --write-mode=check" exited with 1.

Is this a matter of waiting for a new version to be stamped or is there something more fundamental wrong?

@nrc
Copy link
Member

nrc commented May 9, 2018

I think it might just need a more up to date rustfmt in the Rust repo, which should happen with today's nightly.

@volzkzg
Copy link

volzkzg commented May 18, 2018

I use a nightly version rustfmt, but it says
root@d115673865b5:~/cita# cargo fmt -- --write-mode=check Unrecognized option: 'write-mode'

@nrc nrc closed this as completed in 223fdfa May 18, 2018
@davidalber
Copy link
Contributor Author

The Travis config snippet in the README still fails. I added a line (in a different repository) to print version information. Here's the relevant output for the current snippet:

$ rustup component add rustfmt-preview
$ cargo fmt -- --version
rustfmt 0.4.1-stable (7a80726 2018-04-20)

The command "cargo fmt -- --version" exited with 0.
$ cargo fmt --all -- --check
Unrecognized option: 'check'

The command "cargo fmt --all -- --check" exited with 1.

Thus, the change that added --check is not yet available in stable.

It works in nightly, though:

$ rustup component add rustfmt-preview
$ cargo fmt -- --version
rustfmt 0.7.0-nightly (db8cb0b 2018-05-16)

The command "cargo fmt -- --version" exited with 0.
$ cargo fmt --all -- --check

The command "cargo fmt --all -- --check" exited with 0.

When will the stable version change? Should we switch the config snippet to use nightly?

@nrc
Copy link
Member

nrc commented May 18, 2018

Yeah, we should use nightly. Stable should switch at the next release, i.e., 5-ish weeks time

simeg added a commit to simeg/commentective that referenced this issue Jul 1, 2018
This is because of the problems related to rustfmt in this issue: rust-lang/rustfmt#2688
simeg added a commit to simeg/commentective that referenced this issue Jul 1, 2018
This is because of the problems related to rustfmt in this issue: rust-lang/rustfmt#2688
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

No branches or pull requests

3 participants