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

Run rustfmt on Travis #31

Merged
merged 4 commits into from Oct 3, 2017
Merged

Run rustfmt on Travis #31

merged 4 commits into from Oct 3, 2017

Conversation

ekmartin
Copy link
Member

@ekmartin ekmartin commented Oct 2, 2017

This runs rustfmt with --write-mode=diff on Travis, so that the build fails if there are formatting errors. It installs rustfmt from git, with the SHA 6e41100725267974fa6dcc61134d4377b676ad01.

Also shortened a few lines that were above 100 characters, to make the build pass.

@jonhoo
Copy link
Contributor

jonhoo commented Oct 2, 2017

Good idea. I'm guessing we should rebase this on top of #32 to see that it actually works.

@ekmartin
Copy link
Member Author

ekmartin commented Oct 2, 2017

Yep! Although it did pass here earlier: https://travis-ci.org/ekmartin/distributary/builds/282452240

@jonhoo
Copy link
Contributor

jonhoo commented Oct 2, 2017

@ekmartin merged #32 -- rebase?

@ekmartin
Copy link
Member Author

ekmartin commented Oct 2, 2017

Rebased :)

@ekmartin
Copy link
Member Author

ekmartin commented Oct 2, 2017

Should be good to go now @jonhoo (added a commit for two more long lines: b7d7fa9)

@ekmartin ekmartin closed this Oct 3, 2017
@ekmartin ekmartin deleted the travis_fmt branch October 3, 2017 00:50
@jonhoo
Copy link
Contributor

jonhoo commented Oct 3, 2017

@ekmartin why did you close this?

@ekmartin ekmartin restored the travis_fmt branch October 3, 2017 01:54
@ekmartin ekmartin reopened this Oct 3, 2017
@ekmartin
Copy link
Member Author

ekmartin commented Oct 3, 2017

Woops, sorry. Deleted a bunch of branches on my fork while testing stuff with taster.

@ekmartin
Copy link
Member Author

ekmartin commented Oct 3, 2017

cargo fmt failed with a weird error when using the cached rustfmt binary so removed the which rustfmt || clause in e2b5649 so it reinstalls each time instead.

rustfmt: error while loading shared libraries: libsyntax-d36743e8d4fe92fe.so: cannot open shared object file: No such file or directory

@ms705
Copy link
Member

ms705 commented Oct 3, 2017

IIRC, this happens if the Rust nightly is updated without also reinstalling rustfmt; we've had to locally do cargo install -f --git https://github.com/rust-lang-nursery/rustfmt --rev <revision> after each Rust upgrade. The reason is that rustfmt depends on a matching libsyntax from the Rust compiler.

I suspect something similar happens on Travis (e.g., they cache an old version of rustfmt).

@jonhoo
Copy link
Contributor

jonhoo commented Oct 3, 2017

@ms705 is right -- this is caused by a version mismatch between the compiler and rustfmt. I've cleared the travis cache, which tends to help, but it's annoying to deal with nonetheless.

@jonhoo jonhoo merged commit 1ed4a74 into mit-pdos:master Oct 3, 2017
@ekmartin ekmartin deleted the travis_fmt branch November 13, 2017 19:00
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.

None yet

3 participants