Skip to content

Stage0 local rust compatibility checking #33980

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

Closed
MagaTailor opened this issue May 31, 2016 · 1 comment
Closed

Stage0 local rust compatibility checking #33980

MagaTailor opened this issue May 31, 2016 · 1 comment

Comments

@MagaTailor
Copy link

MagaTailor commented May 31, 2016

With the addition of more bootstrap options it would be useful to check local rustc suitability already at configure time.

In the past, an outdated stage0 snapshot (via --enable-local-rust) would barf right away during libcore compilation but nowadays it seems to be more complicated. I've just received reams of errors from as far as libsyntax that, I suspect, must come from incompatible rustc used. A few examples, just to make sure it's no longer #usable:

src/libsyntax/ext/quote.rs:597:64: 597:91 error: failed to resolve. Could not find `Ident` in `ast` [E0433]
src/libsyntax/ext/quote.rs:597                 Some(name) => cx.expr_some(sp, mk_name(cx, sp, ast::Ident::with_empty_ctxt(name)))

src/libsyntax/ext/quote.rs:776:17: 776:41 error: failed to resolve. Could not find `KleeneOp` in `ast` [E0433]
src/libsyntax/ext/quote.rs:776                 ast::KleeneOp::OneOrMore => "OneOrMore",
                                               ^~~~~~~~~~~~~~~~~~~~~~~~

src/libsyntax/ext/quote.rs:917:46: 917:55 error: type name `ast::Expr` is undefined or not in scope [E0412]
src/libsyntax/ext/quote.rs:917                      tts: &[TokenTree]) -> P<ast::Expr> {
                                                                            ^~~~~~~~~

src/libsyntax/ext/quote.rs:64:5: 71:6 error: conflicting implementations of trait `ext::quote::rt::ToTokens`: [E0119]

src/libsyntax/ext/tt/macro_rules.rs:141:1: 158:2 error: conflicting implementations of trait `ext::base::TTMacroExpander` for type `ext::tt::macro_rules::MacroRulesMacroExpander`: [E0119]

and so on. Preferably, an error message could be printed immediately on rustc version check.

Additonally, if a full llvm build is done first, a scenario like that won't lead to lots of wasted time, in case the rustc used (even the official download) is incompatible or crashing (e.g. SIGILL, SIGSEGV):
#33928
#33483

@MagaTailor
Copy link
Author

#31322 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant