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

Transitioning to CircleCI and running latest clippy and rustfmt #107

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

majorz
Copy link
Collaborator

@majorz majorz commented Jan 9, 2018

We are now using the new cross-compilation toolchains from https://github.com/resin-io-projects/rust-cross-toolchains, which allows us to lock the builds to specified stable and unstable Rust versions + specified rustfmt and clippy versions for the tests.

Connects-To: #105
Change-Type: patch
---- Autogenerated Waffleboard Connection: Connects to #105

@majorz majorz requested a review from abrodersen January 9, 2018 11:45
@majorz
Copy link
Collaborator Author

majorz commented Jan 9, 2018

Just to mention that all Rust source changes are done by rustfmt. One for clippy only: transitioning &'static ... to & ... in module level consts.

Copy link

@abrodersen abrodersen left a comment

Choose a reason for hiding this comment

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

One question about which build to use for testing. Otherwise, looks good!

<<: *build
test:
docker:
- image: majorz/rust-test-deploy:rust-nightly-2018-01-08

Choose a reason for hiding this comment

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

Is it a good idea to pin this to a single nightly version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My idea is to bump the nightly version in this place once new image version is published. The commit will go hand in hand with the needed clippy and rustfmt updates. This will solve the problem we often have where a new PR is created and it gets blocked by the fact that clippy has a new version and the build does not pass because of it. So a second PR has to be created, then a rebase is needed, etc. I think it is better to manually bump it up once in a while on Rust stable releases and important clippy versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, one important note is that the Rust nightly version is the one that the clippy version from the image targets, e.g.:
https://github.com/rust-lang-nursery/rust-clippy/blob/master/CHANGELOG.md#00178
https://github.com/resin-io-projects/rust-cross-toolchains/blob/d1b0c745b8762d3bc0b42d116510cabc80a02693/.circleci/config.yml#L47

Sometimes with the current approach of using latest nightly + latest clippy, latest clippy does not compile with latest nightly, so the PR gets blocked awaiting for a new clippy release.

Choose a reason for hiding this comment

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

Gotcha.

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.

2 participants