rust-lang / rust-lang/rust

give a better error when `origin/HEAD` is vastly out of date

Open
#118,758 1 comment 1 reaction 1 assignee View on GitHub

@Teapot4195 is already working on this.

Since Jan 17, 2024.

A-diagnostics T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

i just tried to compile a recent branch of my fork and got this confusing error:

downloading https://ci-artifacts.rust-lang.org/rustc-builds/3572d7451d1062e8bccf310af6bbf6255091d296/rust-dev-nightly-x86_64-pc-windows-msvc.tar.xz
curl: (22) The requested URL returned error: 404

Fallback to PowerShell
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an 
error: (404) Not Found."
At line:1 char:82
+ ... pe]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
 
thread 'main' panicked at src\core\download.rs:211:9:
std::fs::rename(&tempfile, dest_path) failed with The system cannot find the file specified. (os error 2)

notice that 3572d7451d1062e8bccf310af6bbf6255091d296 is from june. this is because git merge-base origin/master HEAD outputs 69a63737fa111b366bb3f3254806547d7dd15678, which in turn is because origin/master points to 69a63737fa111b366bb3f3254806547d7dd15678, which is 6 months old.

it would be nice for bootstrap to give a warning if origin/master is massively outdated. anything more than a week is probably suspect, or if there's any commits in git log origin/master..HEAD that aren't authored by the current user.

there is a second error here that apparently the help_on_error reporting only works on linux, not windows.

@rustbot label +A-diagnostics +T-bootstrap

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.