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

Enforce cargo fmt #199

Merged
merged 4 commits into from
Jan 16, 2019
Merged

Enforce cargo fmt #199

merged 4 commits into from
Jan 16, 2019

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Jan 8, 2019

Closes #198.

@rust-highfive
Copy link

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@tmandry
Copy link
Member Author

tmandry commented Jan 8, 2019

Feel free to merge some things in ahead of this and I'll rebase.. it'll be easier that way.

@nikomatsakis
Copy link
Contributor

Travis seems grumpy. One thing:

$ RUSTC_BOOTSTRAP=1 cargo fmt --all -- --check
error: 'cargo-fmt' is not installed for the toolchain 'nightly-x86_64-unknown-linux-gnu'
To install, run `rustup component add rustfmt`
The command "RUSTC_BOOTSTRAP=1 cargo fmt --all -- --check" exited with 1.

Other things:

error[E0432]: unresolved import `ena::unify`
 --> chalk-solve/src/infer.rs:3:5
  |
3 | use ena::unify as ena;
  |     ^^^^^^^^^^^^^^^^^ no `unify` in `unify`
error[E0432]: unresolved import `ena::unify`
 --> chalk-solve/src/infer.rs:3:5
  |
3 | use ena::unify as ena;
  |     ^^^^^^^^^^^^^^^^^ no `unify` in `unify`

although those things might just be bugs that were fixed

use chalk_ir::fold::Fold;
use chalk_ir::*;
use ena::unify as ena;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading :: got removed.

@tmandry
Copy link
Member Author

tmandry commented Jan 14, 2019

Oops, my nightly was outdated. Trying again.

I also enable Travis caching of cargo in this PR. I don't anticipate any problems with this but if you know of any I'll take it out.

@@ -2,9 +2,13 @@ language: rust
rust:
- beta
- nightly
cache: cargo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will grow the cache every time a different nightly is used, because of rust-lang/cargo#6229

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is, I don't really know what the implications of that are.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache growth will cause CI time to go up, because the whole target dir has to been downloaded, unpacked, repacked and uploaded.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is less than ideal, but if the cache grows too big, we have a button on Travis to delete all repo caches and start fresh.

My expectation is this will save some time, both for installing rustfmt and downloading/building dependencies. But we can see the difference in build times once this is merged and decide to disable it again.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me! I'd like to land this, but I'm not sure whether to worry about the caching issue that @bjorn3 noted. =)

To be honest, I don't entirely know what cache: cargo does.

@tmandry
Copy link
Member Author

tmandry commented Jan 16, 2019

I commented on the thread; I think we can leave it in for now.

@tmandry tmandry merged commit e87a0cc into master Jan 16, 2019
@tmandry tmandry deleted the enforce-cargo-fmt branch January 16, 2019 21:30
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

Successfully merging this pull request may close these issues.

4 participants