Uh oh!
There was an error while loading. Please reload this page.
Correctly get source for metatdata-only crate type - #40542
Conversation
arielb1
commented
Mar 16, 2017
Test please. |
nikomatsakis
commented
Mar 16, 2017
Marking as beta-nominated since this affects the current beta. |
nikomatsakis
commented
Mar 16, 2017
Marking as beta-accepted, once it is r+'d of course (and yes, with test plz). |
Okay, so I've got a minimal case here, involving three crates,
I know about auxiliary builds but how do I force the |
abonander
commented
Mar 16, 2017
I've posted the reproduction at https://github.com/abonander/rust-issue-40535 |
arielb1
commented
Mar 16, 2017
You can create a run-make test (see src/test/run-make). |
abonander
commented
Mar 16, 2017
@arielb1 Can that include Cargo invocations or do I have to write out the commands manually? |
abonander
commented
Mar 16, 2017
Eh I can just copy the output of |
abonander
commented
Mar 16, 2017
Regression test pushed, it detects the error and confirms the fix correctly (fails on ICE, succeeds otherwise) |
jseyfried
left a comment
There was a problem hiding this comment.
Thanks! r=me modulo comment
There was a problem hiding this comment.
nit: add trailing newline (all new files)
There was a problem hiding this comment.
I really gotta figure out how to get IDEA to add those automatically, it's so easy to forget.
abonander
commented
Mar 16, 2017
jseyfried
commented
Mar 16, 2017
@bors r+ |
bors
commented
Mar 16, 2017
📌 Commit e670335 has been approved by |
abonander
commented
Mar 17, 2017
Not sure how to fix this. |
jseyfried
commented
Mar 17, 2017
@abonander The |
abonander
commented
Mar 17, 2017
Why is it not writing there now then? Weird. |
Not sure -- looks like |
arielb1
commented
Mar 17, 2017
@bors r- |
abonander
commented
Mar 18, 2017
I'm testing explicitly adding |
There was a problem hiding this comment.
--out-dir=$(TMPDIR) is already included in $(RUSTC), would be very strange if adding it again here made a difference...
There was a problem hiding this comment.
It may need to be after --emit=metadata, because that's how Cargo writes the command.
abonander
commented
Mar 18, 2017
@jseyfried Tests passed this time. I guess |
alexcrichton
commented
Mar 18, 2017
@bors: r=jseyfried What weird bug! |
bors
commented
Mar 18, 2017
📌 Commit 3cbdb8f has been approved by |
abonander
commented
Mar 18, 2017
@bors r- Let me take care of that "(squash me!) ..." commit first, unless you don't care about that showing up in the commit history (which would be pretty funny to come across later, I guess). |
abonander
commented
Mar 18, 2017
Should I leave a |
| all: | ||
| $(RUSTC) baz.rs --emit=metadata --out-dir=$(TMPDIR) | ||
| $(RUSTC) bar.rs --emit=metadata --extern baz=$(TMPDIR)/libbaz.rmeta --out-dir=$(TMPDIR) | ||
| $(RUSTC) foo.rs --emit=metadata -L dependency=. --extern bar=$(TMPDIR)/libbar.rmeta --out-dir=$(TMPDIR) 2>&1 | \ |
There was a problem hiding this comment.
I don't think -L dependency=. has any effect here.
There was a problem hiding this comment.
Ah, it seemed to before, but now it's fine.
jseyfried
commented
Mar 18, 2017
Sure, I'd at least cc the issue -- if I came across this code I'd probably be curious about the @bors delegate=abonander |
bors
commented
Mar 18, 2017
✌️ @abonander can now approve this pull request |
abonander
commented
Mar 19, 2017
@bors: r=jseyfried Tested it locally, forgot to push before I went out for dinner. |
bors
commented
Mar 19, 2017
📌 Commit 74d6cce has been approved by |
bors
commented
Mar 21, 2017
🔒 Merge conflict |
replace `unwrap()` with `expect()`
bstrie
commented
Mar 21, 2017
@bors r=jseyfried |
bors
commented
Mar 21, 2017
📌 Commit 8a6ef50 has been approved by |
Correctly get source for metatdata-only crate type Closesrust-lang#40535 However, I'm not sure how to approach writing a regression test since I'm still working on a reduced test case from the code that caused the ICE in the first place. It's not enough to have an unknown `extern crate` in a metadata crate, it depends on a few extra arguments but I'm not sure which yet. Also replaced the `unwrap()` with a more informative `expect()`. r? @jseyfried
infinity0
commented
Oct 17, 2017
This test is failing on 1.21.0 on Debian on amd64 and ppc64el: Any clue what's causing it? |
Closes#40535
However, I'm not sure how to approach writing a regression test since I'm still working on a reduced test case from the code that caused the ICE in the first place. It's not enough to have an unknown
extern cratein a metadata crate, it depends on a few extra arguments but I'm not sure which yet.Also replaced the
unwrap()with a more informativeexpect().r? @jseyfried