Skip to content

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

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

Open
jyn514 opened this issue Dec 8, 2023 · 1 comment
Open

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

jyn514 opened this issue Dec 8, 2023 · 1 comment
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 8, 2023

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 3572d74 is from june. this is because git merge-base origin/master HEAD outputs 69a6373, which in turn is because origin/master points to 69a6373, 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

@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-diagnostics Area: Messages for errors, warnings, and lints T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 8, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 10, 2023
@Teapot4195
Copy link
Contributor

On my first attempt it outputted spurious failure, trying again a good number of times and then did in fact output a help message. But when trying again, it then panicked with thread 'main' panicked at 'member failed with premature eof', download.rs:278:30 instead.

I think I have an idea as to how to fix this issue, perhaps removing the build/cache/llvm-xxxx-false folder when the download fails so the error is consistent, I'm a little bit unsure about this approach, so if I could get some comments it would be greatly appreciated.

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants