Skip to content

store the rustc version in metadata and check it #28702

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Sep 30, 2015

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Sep 28, 2015

This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes #28700

r? @nrc

@nrc
Copy link
Member

nrc commented Sep 28, 2015

@bors: r+

@bors
Copy link
Collaborator

bors commented Sep 28, 2015

📌 Commit debc1b9 has been approved by nrc

@nagisa
Copy link
Member

nagisa commented Sep 28, 2015

Is rustc x.y enough? Maybe a version + commit would be better?

I'm pretty sure there’s a non-trivial population using nightly and these are not compatible between compiles either, are they?

@arielb1
Copy link
Contributor Author

arielb1 commented Sep 28, 2015

CFG_VERSION is what rustc --version outputs - for example, 1.4.0-nightly (8f1b0aa32 2015-08-21).

@bors
Copy link
Collaborator

bors commented Sep 28, 2015

⌛ Testing commit debc1b9 with merge 804326a...

@bors
Copy link
Collaborator

bors commented Sep 28, 2015

💔 Test failed - auto-linux-32-opt

@eefriedman
Copy link
Contributor

../src/librustc/middle/expr_use_visitor.rs:283:9: 287:10 error: cannot infer an appropriate lifetime for lifetime parameter `'tcx` due to conflicting requirements
../src/librustc/middle/expr_use_visitor.rs:283         ExprUseVisitor {
../src/librustc/middle/expr_use_visitor.rs:284             typer: typer,
../src/librustc/middle/expr_use_visitor.rs:285             mc: mc::MemCategorizationContext::new(typer),
../src/librustc/middle/expr_use_visitor.rs:286             delegate: delegate,
../src/librustc/middle/expr_use_visitor.rs:287         }
../src/librustc/middle/expr_use_visitor.rs:279:5: 288:6 help: consider using an explicit lifetime parameter as shown: fn new(delegate: &'d mut Delegate<'tcx>, typer: &'t infer::InferCtxt<'a, 'a>)
 -> ExprUseVisitor<'d, 't, 'a, 'a>
../src/librustc/middle/expr_use_visitor.rs:279     pub fn new(delegate: &'d mut Delegate<'tcx>,
../src/librustc/middle/expr_use_visitor.rs:280                typer: &'t infer::InferCtxt<'a, 'tcx>)
../src/librustc/middle/expr_use_visitor.rs:281                -> ExprUseVisitor<'d,'t,'a,'tcx>
../src/librustc/middle/expr_use_visitor.rs:282     {
../src/librustc/middle/expr_use_visitor.rs:283         ExprUseVisitor {
../src/librustc/middle/expr_use_visitor.rs:284             typer: typer,
                                               ...
error: aborting due to previous error

This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes rust-lang#28700
@arielb1 arielb1 force-pushed the metadata-versioning branch from debc1b9 to 9699adc Compare September 29, 2015 18:27
@arielb1
Copy link
Contributor Author

arielb1 commented Sep 29, 2015

@bors r=nrc 9699adc

@bors
Copy link
Collaborator

bors commented Sep 29, 2015

⌛ Testing commit 9699adc with merge ac17bcf...

@bors
Copy link
Collaborator

bors commented Sep 29, 2015

💔 Test failed - auto-win-msvc-32-opt

@arielb1
Copy link
Contributor Author

arielb1 commented Sep 29, 2015

This compiles locally. Why can't it compile on bors too?

@arielb1
Copy link
Contributor Author

arielb1 commented Sep 29, 2015

@bors r=nrc f2d5ebe

@nrc
Copy link
Member

nrc commented Sep 29, 2015

@arielb1 it's an intermittent bug, so annoying. Try adding let result = ...; result that sometimes works.

@bors
Copy link
Collaborator

bors commented Sep 29, 2015

⌛ Testing commit f2d5ebe with merge 65d5c08...

bors added a commit that referenced this pull request Sep 29, 2015
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes #28700

r? @nrc
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants