Skip to content
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

Rust 1.42.0 can't compile Rust 1.42.0 #69953

Closed
thomasjfox opened this issue Mar 12, 2020 · 9 comments
Closed

Rust 1.42.0 can't compile Rust 1.42.0 #69953

thomasjfox opened this issue Mar 12, 2020 · 9 comments
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@thomasjfox
Copy link

Hello together,

compiling Rust 1.42.0 with Rust 1.42.0 results in this error early on:

   Compiling bootstrap v0.0.0 (/datastore/rpmbuild/BUILD/rustc-1.42.0-src/src/bootstrap)                                                                      
error: unnecessary parentheses around block return value                       
    --> src/bootstrap/lib.rs:1029:9                                                                                                                           
     |                                                                                                                                                        
1029 |         (target.contains("linux-gnu") || target.contains("apple-darwin"))                                                                              
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses                                               
     |                                                                                                                                                        
     = note: `-D unused-parens` implied by `-D warnings`                                                                                                      
                                                                                                                                                              
error: aborting due to previous error                                                                                                                         
                                                                                                                                                              
error: could not compile `bootstrap`.

I'm now going to test this fix:
5f979e9#diff-6710e3160b86e8cc371d2ff58ae1061c

The compiler was built with Rust 1.41.1.
I always do the "Rustception" test ;)

@thomasjfox thomasjfox added the C-bug Category: This is a bug. label Mar 12, 2020
@cuviper
Copy link
Member

cuviper commented Mar 12, 2020

I'm now going to test this fix:
5f979e9#diff-6710e3160b86e8cc371d2ff58ae1061c

That change can also be found in 31dcdc9#diff-6710e3160b86e8cc371d2ff58ae1061c, part of the PR when the master branch updated bootstrap to 1.42-beta.

@Mark-Simulacrum
Copy link
Member

Hm, I wonder if we should disable deny-warnings by default if we're not in a git repository or so -- in practice I think it's true there's nothing we could have done to prevent this? i.e., rust-lang/rust needs the parens gone to be able to bootstrap.

@cuviper
Copy link
Member

cuviper commented Mar 12, 2020

in practice I think it's true there's nothing we could have done to prevent this? i.e., rust-lang/rust needs the parens gone to be able to bootstrap.

I'd still like to see something like distcheck for this -- e.g. use the result of a build as the stage0 of a new build. Even just ./x.py check that way would have caught this, I think. At least the removed parens are still compatible either way, so we don't have a dilemma between old and new.

@Mark-Simulacrum
Copy link
Member

Yes, I think it's true that we could catch this -- I'm less concerned about the "how to know this will happen," but more concerned about the fact that keeping code around to support self-bootstrap may not be viable in all cases (e.g., we used to and perhaps still use bootstrap libtest in compiletest or something like that).

OTOH, I believe it is true that such a check would push us to make sure that we bootstrap appropriately which should also always be possible.

@thomasjfox
Copy link
Author

A similar issue has already been discussed previously:
"Rust 1.33 stable fails to compile itself" #58845

Either way, the linked patch fixes the (trivial) issue.

Rust 1.42.0 compiles all the crates I've stored locally, good job with the release!

@cuviper
Copy link
Member

cuviper commented Mar 12, 2020

(e.g., we used to and perhaps still use bootstrap libtest in compiletest or something like that).

#68019 switched that to in-tree libtest, but lang differences still apply, like this paren warning.

@thomasjfox yeah, I thought I had suggested such a distcheck before... just need someone to get around to it, I guess, assuming we have a little bit of CI budget for the task.

@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 12, 2020
@Keruspe
Copy link
Contributor

Keruspe commented Mar 13, 2020

1.42.0 compiles 1.42.0 just fine here if deny-warnings = false

@infinity0
Copy link
Contributor

FWIW we set --cap-lints warn in all Debian rust builds by default to avoid this general problem, since it occasionally occurs in random crates not just rustc itself.

@jonas-schievink
Copy link
Contributor

Closing since 1.43 is now released and there's a workaround if you still need to build 1.42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants