Something is going very wrong with this job: it says that the rustc version is rustc 1.46.0-nightly (4fb54ed48 2020-06-14), which is 1 week outdated, but at the same time rustup update says
# Make sure we really have the latest nightly.
# For some reason Travis puts us on a snapshot by default...
- rustup default nightly
- rustc -Vv
- cargo -V
That’s a different job though? It’s the Miri job, not the all-features job.
Are caches shared across all jobs…?
Travis doesn’t provide a good way to compute the nightly version we need, so there’s no avoiding messing with rustup unfortunately. I know pretty well what I am doing with rustup, but I didn’t expect travis to confuse the caches of different jobs.
I didn’t check if that was the exact job that poisoned the cache or not (I’ll look into that now). This is just very strong evidence that you are doing something funny and as a result, are yourself responsible for diagnosing the resulting errors rather than (or at least before) reporting them as Travis bugs. A build log reports cache IDs that jobs save and restore so you are able to pull the thread back from a faulty job.
If you don’t want Travis’ language installation logic for whatever reason, use language: generic and install all the necessary tooling yourself (generic image doesn’t have Rustup but you can install and cache it). nightly by definition means “rolling release” so it’s logical that Travis doesn’t allow to select a specific build.
I don’t have any idea how to go about debugging this, but my theory for now is that indeed state somehow got mixed up between jobs, so I changed the other job to set the default back to nightly before the cache gets created. Thanks for pointing that out!
There are various good reasons for not wanting to always test the latest nightly, but some specific nightly determined e.g. by the contents of some file.
Yeah I did that elsewhere, also because Travis tends to cache a bit too much for Rust. But that always feels like a hack.
1st build in this PR. Pull Request #44 #162.8 failed, June 22, 2020 11:11:51, rustc 1.46.0-nightly (4fb54ed48 2020-06-14), cache ID master/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--cargo-nightly.tgz – takes it from master
I added it because the other jobs did, and I think it was just a hack to get the name to display, but I might be wrong. Anyway the MIRI env var actually became meaningful for the Miri tool, so we had to stop using it.
Thanks a lot! That is very helpful. So I’ll add some dummy env var then to ensure the cache is separate.