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

Rename rustc_errors dependency in rust 2018 crates #58273

Merged
merged 3 commits into from Feb 13, 2019

Conversation

Projects
None yet
6 participants
@taiki-e
Copy link
Contributor

taiki-e commented Feb 7, 2019

I think this is a better solution than use rustc_errors as errors in lib.rs and use crate::errors in modules.

Related: rust-lang/cargo#5653

cc #58099

r? @Centril

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Feb 8, 2019

use crate::errors::DiagnosticBuilder;
use crate::errors::Level;
use crate::errors::Diagnostic;
use crate::errors::FatalError;

This comment has been minimized.

@matthewjasper

matthewjasper Feb 8, 2019

Contributor

Can these be moved down to the other external dependencies?

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

☔️ The latest upstream changes (presumably #57617) made this pull request unmergeable. Please resolve the merge conflicts.

@taiki-e taiki-e force-pushed the taiki-e:rename-dependency branch from e44c252 to 7abba33 Feb 9, 2019

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 10, 2019

☔️ The latest upstream changes (presumably #57770) made this pull request unmergeable. Please resolve the merge conflicts.

@taiki-e taiki-e force-pushed the taiki-e:rename-dependency branch from 7abba33 to e419806 Feb 10, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 10, 2019

The job x86_64-gnu-llvm-6.0 of 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.
travis_time:end:103a7cf0:start=1549778314219868599,finish=1549778316582096125,duration=2362227526
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:19:12]    Compiling rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
[00:19:12] error[E0432]: unresolved import `crate::errors`
[00:19:12]   --> src/librustc_resolve/error_reporting.rs:12:12
[00:19:12]    |
[00:19:12] 12 | use crate::errors::{Applicability, DiagnosticBuilder, DiagnosticId};
[00:19:12]    |            ^^^^^^ did you mean `syntax::errors`?
[00:19:14] error: aborting due to previous error
[00:19:14] 
[00:19:14] For more information about this error, try `rustc --explain E0432`.
[00:19:14] error: Could not compile `rustc_resolve`.
---
travis_time:end:02f80ad6:start=1549779531477024746,finish=1549779531483289639,duration=6264893
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0d1dcac0
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:15166d90
travis_time:start:15166d90
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0b9f5878
$ dmesg | grep -i kill

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

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 10, 2019

@taiki-e

I think this is a better solution than use rustc_errors as errors in lib.rs and use crate::errors in modules.

FWIW, you don't need use crate::errors, extern crate rustc_errors as errors + use errors would work as well.
Cargo.toml is still the more idiomatic solution though.

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Feb 10, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 10, 2019

📌 Commit 8bb7f5f has been approved by matthewjasper

@taiki-e

This comment has been minimized.

Copy link
Contributor Author

taiki-e commented Feb 10, 2019

@petrochenkov

FWIW, you don't need use crate::errors, extern crate rustc_errors as errors + use errors would work as well.

Yeah, we originally used extern crate rustc_errors as errors + use errors. But changed this to use rustc_errors as errors + use crate::errors based on unused_extern_crates(included in rust_2018_idioms)'s message.
(And I remembered that there was a way not requiring #[allow(unused_extern_crates)] or use crate::errors after they were merged, so I wrote this PR.)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 10, 2019

☔️ The latest upstream changes (presumably #58151) made this pull request unmergeable. Please resolve the merge conflicts.

@taiki-e taiki-e force-pushed the taiki-e:rename-dependency branch from 8bb7f5f to 485d888 Feb 10, 2019

@taiki-e

This comment has been minimized.

Copy link
Contributor Author

taiki-e commented Feb 12, 2019

Rebased.

r? @matthewjasper

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

☔️ The latest upstream changes (presumably #58098) made this pull request unmergeable. Please resolve the merge conflicts.

@taiki-e taiki-e force-pushed the taiki-e:rename-dependency branch from 485d888 to c08b5ca Feb 12, 2019

@taiki-e

This comment has been minimized.

Copy link
Contributor Author

taiki-e commented Feb 12, 2019

Rebased.

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Feb 12, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit c08b5ca has been approved by matthewjasper

Centril added a commit to Centril/rust that referenced this pull request Feb 13, 2019

Rollup merge of rust-lang#58273 - taiki-e:rename-dependency, r=matthe…
…wjasper

Rename rustc_errors dependency in rust 2018 crates

I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules.

Related: rust-lang/cargo#5653

cc rust-lang#58099

r? @Centril

Centril added a commit to Centril/rust that referenced this pull request Feb 13, 2019

Rollup merge of rust-lang#58273 - taiki-e:rename-dependency, r=matthe…
…wjasper

Rename rustc_errors dependency in rust 2018 crates

I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules.

Related: rust-lang/cargo#5653

cc rust-lang#58099

r? @Centril

bors added a commit that referenced this pull request Feb 13, 2019

Auto merge of #58413 - Centril:rollup, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #57693 (Doc rewording)
 - #57815 (Speed up the fast path for assert_eq! and assert_ne!)
 - #58034 (Stabilize the time_checked_add feature)
 - #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO))
 - #58137 (Cleanup: rename node_id_to_type(_opt))
 - #58166 (allow shorthand syntax for deprecation reason)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58200 (fix str mutating through a ptr derived from &self)
 - #58273 (Rename rustc_errors dependency in rust 2018 crates)
 - #58289 (impl iter() for dyn Error)
 - #58387 (Disallow `auto` trait alias syntax)
 - #58404 (use Ubuntu keyserver for CloudABI ports)
 - #58405 (Remove some dead code from libcore)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Feb 13, 2019

Rollup merge of rust-lang#58273 - taiki-e:rename-dependency, r=matthe…
…wjasper

Rename rustc_errors dependency in rust 2018 crates

I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules.

Related: rust-lang/cargo#5653

cc rust-lang#58099

r? @Centril

bors added a commit that referenced this pull request Feb 13, 2019

Auto merge of #58415 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57693 (Doc rewording)
 - #57815 (Speed up the fast path for assert_eq! and assert_ne!)
 - #58034 (Stabilize the time_checked_add feature)
 - #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO))
 - #58137 (Cleanup: rename node_id_to_type(_opt))
 - #58166 (allow shorthand syntax for deprecation reason)
 - #58200 (fix str mutating through a ptr derived from &self)
 - #58273 (Rename rustc_errors dependency in rust 2018 crates)
 - #58289 (impl iter() for dyn Error)
 - #58387 (Disallow `auto` trait alias syntax)
 - #58404 (use Ubuntu keyserver for CloudABI ports)
 - #58405 (Remove some dead code from libcore)

Failed merges:

r? @ghost

@bors bors merged commit c08b5ca into rust-lang:master Feb 13, 2019

@taiki-e taiki-e deleted the taiki-e:rename-dependency branch Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment