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

Include rustfmt and clippy components by default #1569

Closed
tyranron opened this issue Dec 11, 2018 · 6 comments
Closed

Include rustfmt and clippy components by default #1569

tyranron opened this issue Dec 11, 2018 · 6 comments

Comments

@tyranron
Copy link

Originated in rust-lang/docker-rust#37

rustfmt and clippy components are widely used tools by many projects. However, there is some friction with using them on CI and dockerized environments:

  • Docker image doesn't contain them, so we need to run rustup add component rustfmt any time we're using Docker image for that purpose. On CIs it just unnecessarily increases network activity. In CLI usage it becomes trickier as docker run --rm -v "$(pwd)":/app -w /app rust:1.31 cargo fmt just fails.
  • More confusion comes when we cannot even pre-install rustfmt/clippy on nightly.

The motivation of official Rust Docker images is to follow upstream tools as mush as possible without providing difference with official installations. As the result, these issues make people to workaround/hack or come up with their own Docker images.

Can we somehow provide a smoother experience?

@nrc
Copy link
Member

nrc commented Dec 11, 2018

I'm currently implementing 'profiles' for Rustup which will include tools, the default profile will include Rustfmt and Clippy.

@kinnison
Copy link
Contributor

Profiles were released with 1.20, this is "done"

@Stargateur
Copy link

@kinnison Can you add where we can find it ? I don't find any information on the README. Thanks

@kinnison
Copy link
Contributor

@Stargateur the README for Rustup clearly states the content of the default profile includes rustfmt and clippy -- https://github.com/rust-lang/rustup/#profiles

@Stargateur
Copy link

Stargateur commented Feb 18, 2020

@kinnison Maybe I miss understand, the issue is about docker, so my question was where this information is on docker readme, I'm using "rust:latest" as image and I would like to know if this include fmt, that seem to not be the case.

My question more simply is there a official docker image with rustfmt installed ?

@kinnison
Copy link
Contributor

Oh I'm sorry, I didn't realise -- rustup has nothing to do with the rust:latest docker per-se, sorry. Whoever provides that would need to help you out. I'm afraid I have no clue who that is. I've asked on the infrastructure channel but they've not answered me yet. You'd be best off investigating who owns that dockerhub release and talking with them, sorry.

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

4 participants