diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2020-06-17 19:05:53 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2020-06-17 19:14:35 -0400 |
| commit | f43bcb502435ccd99e163671204371dd8b62024f (patch) | |
| tree | a72a48a4c8f78515499ef639f4e2f6528bbe1384 /.travis.yml | |
| parent | cc4d61afc17197bf5f7b7f4e6b7fcd813457b0b2 (diff) | |
Move from rust-toolchain to rustup overrides for rust version selection.
This is a complicated one. There are a few factors in action here:
* For background, the `maud` library requires nightly. The macro shenanigans it pulls are not supported on stable.
<https://maud.lambda.xyz/getting-started.html>
* Travis installs Rust "cold," with no prior Rust installation, using `rustup`, for each entry in the build matrix. Travis _always_ uses the "minimal" profile.
<https://docs.travis-ci.com/user/languages/rust/#choosing-a-rust-version>
* Since 2020-06-10, the "nightly" release of the Rust language has not included the `rustfmt` component.
<http://rust-lang.github.io/rustup-components-history/>
Note that the information on that page is likely to be different by the time you look at it.
* The Travis test suite requires `rustfmt` to validate commits. See `.travis.yml` for that one.
* Rustup will prefer `rust-toolchain` files over command-line options when selecting a Rust version to install.
Because of this wide range of factors, since the eleventh, it has not been possible to run `rustfmt` via `cargo fmt` on Travis. Tests have been broken since we added `rustfmt` as a mandatory step.
This change causes Travis to use both a known-good nightly (June 10th's), and also to try the build with current nightly. Current nightly is permitted to fail; once this starts passing, we can make that build mandatory and reinstate `rust-toolchain`.
Note that this doesn't affect most developers, as they use `rustup`'s default profile, which always includes `rustfmt`. `rustup` accomplishes this by walking back in time until it finds a nightly build that includes all the components in the profile, but it only does this when installing a fresh toolchain, not when trying to add a component to an installed toolchain.
I would vastly prefer to keep `rust-toolchain`, but it interferes with `rustup`'s installation logic, so it has to go for now.
Score one for never using `nightly`...
Diffstat (limited to '.travis.yml')
| -rw-r--r-- | .travis.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index cda2e4c..40cd744 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,14 @@ language: rust +# 2020-06-17 - nightly hasn't had rustfmt since 2020-06-10, so builds fail on +# that toolchain. We want to use it as far as is possible, though. rust: + - nightly - nightly-2020-06-10 +jobs: + allow_failures: + - rust: nightly + cache: cargo install: |
