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

cargo fix --edition fails on TiKV #6520

Closed
brson opened this issue Jan 3, 2019 · 2 comments
Closed

cargo fix --edition fails on TiKV #6520

brson opened this issue Jan 3, 2019 · 2 comments
Labels
C-bug Category: bug

Comments

@brson
Copy link
Contributor

brson commented Jan 3, 2019

Problem

rustfix errored while upgrading TiKV to 2018, this branch: https://github.com/brson/tikv/tree/nightly-upgrade, commit 72bc513.

Output:

      Fixing src/bin/util/signal_handler.rs (1 fix)
warning: failed to automatically apply fixes suggested by rustc to crate `tikv_importer`

after fixes were automatically applied the compiler reported errors within these files:

  * src/bin/util/signal_handler.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

error[E0432]: unresolved import `crate::util::profilingofiling`
  --> src/bin/util/signal_handler.rs:18:9
   |
18 |     use crate::util::profilingofiling;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `profilingofiling` in `util`

error[E0433]: failed to resolve: use of undeclared type or module `profiling`
  --> src/bin/util/signal_handler.rs:42:28
   |
42 |                 SIGUSR2 => profiling::dump_prof(None),
   |                            ^^^^^^^^^ use of undeclared type or module `profiling`

warning: unused import: `crate::util::profilingofiling`
  --> src/bin/util/signal_handler.rs:18:9
   |
18 |     use crate::util::profilingofiling;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
  --> src/bin/tikv-importer.rs:43:5
   |
43 | use util::setup::*;
   |     ^^^^^^^^^^^^^^ help: use `crate`: `crate::util::setup::*`
   |
   = note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
   = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
  --> src/bin/tikv-importer.rs:44:5
   |
44 | use util::signal_handler;
   |     ^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::util::signal_handler`
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
   = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>

error: aborting due to 2 previous errors

Some errors occurred: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: Could not compile `tikv`.
warning: build failed, waiting for other jobs to finish...
warning: failed to automatically apply fixes suggested by rustc to crate `tikv_ctl`

after fixes were automatically applied the compiler reported errors within these files:

  * src/bin/util/signal_handler.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

error: build failed

Steps

Run cargo fix --edition in the linked repo.

Notes

Output of cargo version:

cargo 1.32.0-nightly (5e85ba1 2018-12-02)

@brson brson added the C-bug Category: bug label Jan 3, 2019
@ehuss
Copy link
Contributor

ehuss commented Jan 3, 2019

I think you need a newer version of nightly, the latest seems to work for me. I'm not sure, but I suspect #6434 is what fixes it. If you can't switch the nightly version, try fixing just one target at a time (--lib, --bin tikv, etc.).

@alexcrichton
Copy link
Member

Thanks for diagnosing @ehuss! Agreed that looks like the issue here, so I'm gonna close this as it should ride the trains soon.

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

No branches or pull requests

3 participants