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

Fix save-analysis generation with extern_in_paths/extern_absolute_paths #49847

Merged
merged 4 commits into from
Apr 16, 2018

Conversation

sinkuu
Copy link
Contributor

@sinkuu sinkuu commented Apr 10, 2018

Fixes #48742.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2018
cmp::Reverse(match src {
ExternCrateSource::Extern { path_len, .. } |
ExternCrateSource::Use { path_len } => path_len,
_ => usize::max_value(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it'd be more convenient to move path_len into ExternCrate and initialize it to usize::max_value() for ExternCrateSource::Path.
(Maybe some better heuristic than max_value could be found later).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@petrochenkov
Copy link
Contributor

r=me after addressing the comment

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2018
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 13, 2018

📌 Commit 2c7e83f has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 13, 2018
@bors
Copy link
Contributor

bors commented Apr 14, 2018

⌛ Testing commit 2c7e83f with merge c7967bb133a85653e8a27f38dc0a4fa19af9b65f...

@bors
Copy link
Contributor

bors commented Apr 14, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 14, 2018
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:23:50] error: internal compiler error: librustc_save_analysis/lib.rs:117: no data for crate 7
---
[00:23:51]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=d9da2a2253530287 -C extra-filename=-d9da2a2253530287 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps --target arm-unknown-linux-gnueabihf -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liblibc-9f0d372404db7b62.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libpanic_unwind-52658ef1dfd0bf87.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libpanic_abort-caf5925d568bdc6d.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc_jemalloc-43e4a879336eaba6.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libcore-88a4d043878d936a.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libunwind-edc4e9c4f1f2620d.rlib --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc-b9e1e80353ce065e.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libcompiler_builtins-fe0d984dfcb9746e.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libstd_unicode-c4b88a51a5f32951.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc_system-845a9d197171fd43.rlib -L native=/checkout/obj/build/arm-unknown-linux-gnueabihf/native/libbacktrace/.libs -l static=backtrace -l dl -l rt -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/build/compiler_builtins-4bdac560af2d255d/out -L native=/checkout/obj/build/arm-unknown-linux-gnueabihf/native/jemalloc/lib` (exit code: 101)
[00:23:51] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "arm-unknown-linux-gnueabihf" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:23:51] expected success, got: exit code: 101
[00:23:51] travis_fold:end:stage1-std
[00:23:51] travis_time:end:stage1-std:start=1523737265129026717,finish=1523737319652099327,duration=54523072610
[00:23:51] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1085:9
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:0d769038:start=1523737320225485012,finish=1523737320234810715,duration=9325703
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:0df0e020
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:0df0e020:start=1523737320239946248,finish=1523737320245556695,duration=5610447
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10a8135d
$ dmesg | grep -i kill
[   10.194420] init: failsafe main process (1093) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

1 similar comment
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:23:50] error: internal compiler error: librustc_save_analysis/lib.rs:117: no data for crate 7
---
[00:23:51]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=d9da2a2253530287 -C extra-filename=-d9da2a2253530287 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps --target arm-unknown-linux-gnueabihf -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liblibc-9f0d372404db7b62.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libpanic_unwind-52658ef1dfd0bf87.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libpanic_abort-caf5925d568bdc6d.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc_jemalloc-43e4a879336eaba6.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libcore-88a4d043878d936a.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libunwind-edc4e9c4f1f2620d.rlib --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc-b9e1e80353ce065e.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libcompiler_builtins-fe0d984dfcb9746e.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/libstd_unicode-c4b88a51a5f32951.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/deps/liballoc_system-845a9d197171fd43.rlib -L native=/checkout/obj/build/arm-unknown-linux-gnueabihf/native/libbacktrace/.libs -l static=backtrace -l dl -l rt -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/arm-unknown-linux-gnueabihf/release/build/compiler_builtins-4bdac560af2d255d/out -L native=/checkout/obj/build/arm-unknown-linux-gnueabihf/native/jemalloc/lib` (exit code: 101)
[00:23:51] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "arm-unknown-linux-gnueabihf" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:23:51] expected success, got: exit code: 101
[00:23:51] travis_fold:end:stage1-std
[00:23:51] travis_time:end:stage1-std:start=1523737265129026717,finish=1523737319652099327,duration=54523072610
[00:23:51] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1085:9
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:0d769038:start=1523737320225485012,finish=1523737320234810715,duration=9325703
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:0df0e020
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:0df0e020:start=1523737320239946248,finish=1523737320245556695,duration=5610447
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10a8135d
$ dmesg | grep -i kill
[   10.194420] init: failsafe main process (1093) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2018
Injected crates don't have extern info. Let's skip them.
@sinkuu
Copy link
Contributor Author

sinkuu commented Apr 15, 2018

Fixed.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 15, 2018

📌 Commit c3dc014 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 15, 2018
@bors
Copy link
Contributor

bors commented Apr 16, 2018

⌛ Testing commit c3dc014 with merge 748c549...

bors added a commit that referenced this pull request Apr 16, 2018
…henkov

Fix save-analysis generation with extern_in_paths/extern_absolute_paths

Fixes #48742.
@bors
Copy link
Contributor

bors commented Apr 16, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing 748c549 to master...

@bors bors merged commit c3dc014 into rust-lang:master Apr 16, 2018
@sinkuu sinkuu deleted the save_analysis_implicit_extern branch April 16, 2018 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants