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

Make Rust build stricter. #193

Closed
artem-zinnatullin opened this issue Mar 1, 2018 · 1 comment
Closed

Make Rust build stricter. #193

artem-zinnatullin opened this issue Mar 1, 2018 · 1 comment
Assignees
Milestone

Comments

@artem-zinnatullin
Copy link
Contributor

Specifically:

@artem-zinnatullin
Copy link
Contributor Author

Hmm, looks like failing build because of warnings is not considered a super great practice in Rust community (cc @pepyakin):

As far as I understand it's mainly due to the way you get Rust on your system, by default rustup brings whatever latest stable version is which might bring new warnings and break build that didn't change any code

However there are ways to install specific Rust version, so combining that with failing on warnings seems reasonable for me because I want to control Rust version anyway

artem-zinnatullin added a commit that referenced this issue Nov 13, 2018
Part of #193.

Had to update Rust and its toolchain to install [Clippy](https://github.com/rust-lang-nursery/rust-clippy), it wasn't part of official toolchain in 1.24.1.

Rust changelog: https://github.com/rust-lang/rust/blob/1.30.0/RELEASES.md
artem-zinnatullin added a commit that referenced this issue Nov 14, 2018
Closes #193.

Final part of making our build stricter — treating compile warnings as errors.

The change also includes docker arguments to propagate interactive output, thus get colors of warnings/errors locally and on CI (as well as CTRL+C support and other signals propagated through interactive mode).

Tested by adding unused variable:

```console
Building debug version of Mainframer...
   Compiling mainframer v3.0.0-dev (/opt/project)
error: unused variable: `x`
  --> src/main.rs:30:9
   |
30 |     let x = 1;
   |         ^ help: consider using `_x` instead
   |
   = note: `-D unused-variables` implied by `-D warnings`

error: aborting due to previous error

error: Could not compile `mainframer`.

To learn more, run the command again with --verbose.

Test run FAILED, 1 test(s).
To log each step: export DEBUG_MODE_FOR_ALL_TESTS=true
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant