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

Distribute using rustup rather than Cargo #1526

Closed
nrc opened this issue May 10, 2017 · 13 comments
Closed

Distribute using rustup rather than Cargo #1526

nrc opened this issue May 10, 2017 · 13 comments

Comments

@nrc
Copy link
Member

nrc commented May 10, 2017

No description provided.

@nrc nrc mentioned this issue May 10, 2017
@nrc nrc added this to the 1.0 milestone Nov 2, 2017
@nrc
Copy link
Member Author

nrc commented Nov 2, 2017

@crumblingstatue
Copy link
Contributor

I see that rustup now distributes rustfmt-preview, which comes with cargo-fmt. However, cargo fails to recognize fmt as a subcommand. Is support for this just not implemented yet, or is there something wrong on my end?

@nrc
Copy link
Member Author

nrc commented Nov 27, 2017

It does not quite work yet, sorry (even using rustfmt does not work properly), but it should be done soon...

@jonhoo
Copy link
Contributor

jonhoo commented Jan 3, 2018

@crumblingstatue fwiw, I worked around by linking rustup into /usr/bin (or anywhere on your $PATH) with the appropriate names:

$ ls -la /usr/bin/{cargo-fmt,rustfmt}
lrwxrwxrwx 1 root root 15 Dec 20 21:49 /usr/bin/cargo-fmt -> /usr/bin/rustup*
lrwxrwxrwx 1 root root 15 Dec 20 21:49 /usr/bin/rustfmt -> /usr/bin/rustup*

@jonhoo
Copy link
Contributor

jonhoo commented Jan 3, 2018

@nrc one question though: how is the rustfmt-preview that is now included with rustup updated?

@nrc
Copy link
Member Author

nrc commented Jan 4, 2018

@jonhoo rustup update will update it

@jonhoo
Copy link
Contributor

jonhoo commented Jan 11, 2018

Hmm, that doesn't seem to be the case for me?

$ ls -l /usr/bin/rustfmt
lrwxrwxrwx 1 root root 15 Jan  9 14:28 /usr/bin/rustfmt -> /usr/bin/rustup*
$ rustfmt +nightly --version
0.3.4-nightly (6714a44 2017-12-23)
$ rustup update
...
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2018-01-11, rust version 1.25.0-nightly (f62f77403 2018-01-10)
...
info: downloading component 'rustfmt-preview'
...
info: removing component 'rustfmt-preview'
...
info: installing component 'rustfmt-preview'
...

  nightly-x86_64-unknown-linux-gnu updated - rustc 1.25.0-nightly (f62f77403 2018-01-10)

$ rustfmt +nightly --version
0.3.4-nightly (6714a44 2017-12-23)

@jonhoo
Copy link
Contributor

jonhoo commented Jan 13, 2018

@nrc ^

@topecongiro
Copy link
Contributor

@jonhoo It looks to me that rustfmt was correctly up to date.

@jonhoo
Copy link
Contributor

jonhoo commented Jan 15, 2018

Ohh, I guess it only pulls released versions, not the latest git version. That makes sense.

@andersk
Copy link

andersk commented Jan 18, 2018

The rustfmt-preview component disappeared from the nightly toolchain a few days ago.

$ rustup default nightly-2018-01-14
…
  nightly-2018-01-14-x86_64-unknown-linux-gnu installed - rustc 1.25.0-nightly (e6072a7b3 2018-01-13)

$ rustup component add rustfmt-preview
info: downloading component 'rustfmt-preview'
  1.9 MiB /   1.9 MiB (100 %)   1.0 MiB/s ETA:   0 s                
info: installing component 'rustfmt-preview'

$ rustup default nightly-2018-01-15
…
  nightly-2018-01-15-x86_64-unknown-linux-gnu installed - rustc 1.25.0-nightly (3f92e8d89 2018-01-14)

$ rustup component add rustfmt-preview
error: toolchain 'nightly-2018-01-15-x86_64-unknown-linux-gnu' does not contain component 'rustfmt-preview' for target 'x86_64-unknown-linux-gnu'

$ rustup default nightly
…
  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.25.0-nightly (0f9c78475 2018-01-17)

$ rustup component add rustfmt-preview
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rustfmt-preview' for target 'x86_64-unknown-linux-gnu'

@topecongiro
Copy link
Contributor

rustfmt-preview is back since rustc 1.25.0-nightly (5965b7901 2018-01-19).

@nrc
Copy link
Member Author

nrc commented Feb 5, 2018

This is done now, but I should announce it properly.

@nrc nrc closed this as completed Feb 5, 2018
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

5 participants