cargo fmt

2 views
Skip to first unread message

Rob Tsuk

unread,
Aug 1, 2017, 1:22:57 PM8/1/17
to rust-f...@fuchsia.com
I'd like us to standardize on using cargo fmt to format Rust artifacts we're developing for Fuchsia. The problem is that the version I'm using clearly doesn't match what others are using. Is there a recommendation on a particular process for using a consistent version of cargo fmt for all developers?

Taylor Cramer

unread,
Aug 1, 2017, 1:25:09 PM8/1/17
to Rob Tsuk, rust-f...@fuchsia.com
IIRC all new development on rustfmt is happening on rustfmt-nightly, so there won't be any updates to the rustfmt package for a while. If we all run `cargo install rustfmt` right now, we should be good to go for a while until the new rustfmt (based on libsyntax) is stabilized.

On Tue, Aug 1, 2017 at 10:22 AM, 'Rob Tsuk' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
I'd like us to standardize on using cargo fmt to format Rust artifacts we're developing for Fuchsia. The problem is that the version I'm using clearly doesn't match what others are using. Is there a recommendation on a particular process for using a consistent version of cargo fmt for all developers?

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.
To post to this group, send email to rust-f...@fuchsia.com.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAOSFqFXh1ohmsV0Nwr7KQP8sB-%2Bo9inpnJKdfXP79Y1PAFMNSw%40mail.gmail.com.

Rob Tsuk

unread,
Aug 1, 2017, 1:32:38 PM8/1/17
to Taylor Cramer, rust-f...@fuchsia.com
Yep, that did it. Not sure I'm wild about all the differences but I'm sure I'll get used to it.

Tim Kilbourn

unread,
Aug 1, 2017, 1:37:44 PM8/1/17
to Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com
Yeah I've not been a big fan of some of the formatting choices (e.g., all method parameters on individual lines, with the return type on yet-another line), but I'm happy to use a standard regardless.

Jason Schein

unread,
Aug 1, 2017, 4:57:11 PM8/1/17
to Tim Kilbourn, Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com
So we are using the stable version, not the nightly one, correct?

James Tucker

unread,
Aug 1, 2017, 5:05:01 PM8/1/17
to Jason Schein, Tim Kilbourn, Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com
We're using nightly for our toolchain, so I'd actually recommend that we use the nightly rustup chain and tools.

There are additional reasons for this - it gives you a rust language server that works correctly with our toolchain.

Jason Schein

unread,
Aug 1, 2017, 5:15:15 PM8/1/17
to James Tucker, Tim Kilbourn, Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com

Tristan Hume

unread,
Aug 1, 2017, 5:21:25 PM8/1/17
to Jason Schein, James Tucker, Tim Kilbourn, Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com
To clarify: From what I understand, rustfmt-nightly and Rust nightly are separate things. We are using Rust nightly with the latest *stable* rustfmt. 

They both have separate release processes and you get them separately. Running "cargo install rustfmt" should get you the right version of rustfmt (the stable one) regardless of whether you are using nightly or stable Rust.

On Tue, Aug 1, 2017 at 2:15 PM 'Jason Schein' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Ok sounds good.

On Tue, Aug 1, 2017 at 2:05 PM, 'James Tucker' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
We're using nightly for our toolchain, so I'd actually recommend that we use the nightly rustup chain and tools.

There are additional reasons for this - it gives you a rust language server that works correctly with our toolchain.
On Tue, Aug 1, 2017 at 1:57 PM, 'Jason Schein' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
So we are using the stable version, not the nightly one, correct?
On Tue, Aug 1, 2017 at 10:37 AM, 'Tim Kilbourn' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Yeah I've not been a big fan of some of the formatting choices (e.g., all method parameters on individual lines, with the return type on yet-another line), but I'm happy to use a standard regardless.
On Tue, Aug 1, 2017 at 10:32 AM, 'Rob Tsuk' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Yep, that did it. Not sure I'm wild about all the differences but I'm sure I'll get used to it.
On Tue, Aug 1, 2017 at 10:25 AM, Taylor Cramer <cram...@google.com> wrote:
IIRC all new development on rustfmt is happening on rustfmt-nightly, so there won't be any updates to the rustfmt package for a while. If we all run `cargo install rustfmt` right now, we should be good to go for a while until the new rustfmt (based on libsyntax) is stabilized.
On Tue, Aug 1, 2017 at 10:22 AM, 'Rob Tsuk' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
I'd like us to standardize on using cargo fmt to format Rust artifacts we're developing for Fuchsia. The problem is that the version I'm using clearly doesn't match what others are using. Is there a recommendation on a particular process for using a consistent version of cargo fmt for all developers?

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

Jason Schein

unread,
Aug 1, 2017, 5:27:45 PM8/1/17
to Tristan Hume, James Tucker, Tim Kilbourn, Rob Tsuk, Taylor Cramer, rust-f...@fuchsia.com
Ah, OK that was the source of my confusion. Currently I have nightly rustfmt. I'll change to stable.

On Tue, Aug 1, 2017 at 2:21 PM, Tristan Hume <tris...@google.com> wrote:
To clarify: From what I understand, rustfmt-nightly and Rust nightly are separate things. We are using Rust nightly with the latest *stable* rustfmt. 

They both have separate release processes and you get them separately. Running "cargo install rustfmt" should get you the right version of rustfmt (the stable one) regardless of whether you are using nightly or stable Rust.

On Tue, Aug 1, 2017 at 2:15 PM 'Jason Schein' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Ok sounds good.

On Tue, Aug 1, 2017 at 2:05 PM, 'James Tucker' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
We're using nightly for our toolchain, so I'd actually recommend that we use the nightly rustup chain and tools.

There are additional reasons for this - it gives you a rust language server that works correctly with our toolchain.
On Tue, Aug 1, 2017 at 1:57 PM, 'Jason Schein' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
So we are using the stable version, not the nightly one, correct?
On Tue, Aug 1, 2017 at 10:37 AM, 'Tim Kilbourn' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Yeah I've not been a big fan of some of the formatting choices (e.g., all method parameters on individual lines, with the return type on yet-another line), but I'm happy to use a standard regardless.
On Tue, Aug 1, 2017 at 10:32 AM, 'Rob Tsuk' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Yep, that did it. Not sure I'm wild about all the differences but I'm sure I'll get used to it.
On Tue, Aug 1, 2017 at 10:25 AM, Taylor Cramer <cram...@google.com> wrote:
IIRC all new development on rustfmt is happening on rustfmt-nightly, so there won't be any updates to the rustfmt package for a while. If we all run `cargo install rustfmt` right now, we should be good to go for a while until the new rustfmt (based on libsyntax) is stabilized.
On Tue, Aug 1, 2017 at 10:22 AM, 'Rob Tsuk' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
I'd like us to standardize on using cargo fmt to format Rust artifacts we're developing for Fuchsia. The problem is that the version I'm using clearly doesn't match what others are using. Is there a recommendation on a particular process for using a consistent version of cargo fmt for all developers?

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

Rob Tsuk

unread,
Aug 1, 2017, 5:51:35 PM8/1/17
to Jason Schein, Tristan Hume, James Tucker, Tim Kilbourn, Taylor Cramer, rust-f...@fuchsia.com
Yep, there's a second email chain about what version of the toolchain to use. This is just about everyone using the same formatter, and making sure it doesn't change that frequently so.
Reply all
Reply to author
Forward
0 new messages