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 fmt --all -- --check issues error for crate that is not part of either the workspace or the path dependencies. #3725

Closed
taiki-e opened this issue Aug 3, 2019 · 1 comment · Fixed by #3726

Comments

@taiki-e
Copy link
Member

taiki-e commented Aug 3, 2019

https://dev.azure.com/tokio-rs/Tokio/_build/results?buildId=1748&view=logs

Diff in /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-codec-0.1.1/src/bytes_codec.rs at line 1:
-use bytes::{Bytes, BufMut, BytesMut};
-use tokio_io::_tokio_codec::{Encoder, Decoder};
+use bytes::{BufMut, Bytes, BytesMut};
 use std::io;
+use tokio_io::_tokio_codec::{Decoder, Encoder};

toolchain: nightly-2019-08-01, (Probably nightly-2019-07-18 and later, it didn't happen in nightly-2019-07-17 or earlier versions)

@calebcartwright
Copy link
Member

calebcartwright commented Aug 3, 2019

Think I know why this one is happening (unintended side effect of #3664)

tokio-codec is a member of the top level workspace, but it's also separately consumed from crates.io by other dependencies in the broader dependency tree as seen in the cargo metadata output.

The check used for the All strategy is incorrectly including those non-local dependencies because the non-local dependency name (tokio-codec) also happens to match the name of a workspace member. Augmenting that check should resolve this issue

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

Successfully merging a pull request may close this issue.

2 participants