From f9c86687fd03a787436f9975c44d25833291ea6f Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 17 Jun 2020 17:26:33 -0400 Subject: Add missing dependencies for rustfmt Travis pass. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4292ca5..e2656f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ rust: cache: cargo install: - - rustup component add clippy + - rustup component add clippy rustfmt - cargo install cargo-udeps - cargo build -- cgit v1.2.3 From cc4d61afc17197bf5f7b7f4e6b7fcd813457b0b2 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 17 Jun 2020 18:04:52 -0400 Subject: Switch Travis to a dated Nightly. As of 2020-06-17, rustup nightlies are missing rustfmt, rls, and a few other components we care about. Pin the rust version, for now, as we need those components for testing. Check to monitor the contents of nightly releases. --- .travis.yml | 2 +- rust-toolchain | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2656f5..cda2e4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - nightly + - nightly-2020-06-10 cache: cargo diff --git a/rust-toolchain b/rust-toolchain index bf867e0..4aec5c6 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly +nightly-2020-06-10 -- cgit v1.2.3 From f43bcb502435ccd99e163671204371dd8b62024f Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 17 Jun 2020 19:05:53 -0400 Subject: 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. * Travis installs Rust "cold," with no prior Rust installation, using `rustup`, for each entry in the build matrix. Travis _always_ uses the "minimal" profile. * Since 2020-06-10, the "nightly" release of the Rust language has not included the `rustfmt` component. 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`... --- .travis.yml | 7 +++++++ README.md | 6 ++++++ rust-toolchain | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) delete mode 100644 rust-toolchain 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: diff --git a/README.md b/README.md index cfdd2f2..9cffd6d 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,12 @@ I thought this was such a good idea, I turned it into a web bot. Want to work on this code, or run it yourself? Install the following: * [An installed copy of the Rust toolchain](https://rustup.rs). +* The `nightly` toolchain: + + ```bash + rustup toolchain add nightly + rustup override set nightly + ``` Building, testing, &c follow Rust norms: use [Cargo](https://doc.rust-lang.org/cargo/guide/working-on-an-existing-project.html) diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 4aec5c6..0000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -nightly-2020-06-10 -- cgit v1.2.3