-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 test --doc
fails with multiple rlib candidates for * found
#6819
Comments
Full |
Hm, that's interesting. It looks like I think the issue is somewhere around here. This was changed in #3721 to attempt to address this, but the doctest case seems broken. I'll try to look at it sometime soon. |
Oh gosh. I've copy-pasted Cargo.toml and forgot to update it. Thank you for finding this! It is weird that only the doc test are failing, though! Let me know if you'd like me to close the issue. |
Hm, thinking about it more, it may be difficult/impossible to fix. rustdoc is building the tests from scratch and doesn't know about the local crate. One workaround is to give the other crate a different name (using rename), something like this: diff --git a/Cargo.toml b/Cargo.toml
index 23d1086..f8dde9e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ license = "MIT"
repository = "https://github.com/indutny/append-multi-log"
[dependencies]
-append-log = "0.1.4-dev"
+append-log-other = { version="0.1.4-dev", package="append-log" }
[dev-dependencies]
tempfile = "^3.0.7"
diff --git a/src/log.rs b/src/log.rs
index 86eda7a..a537fb2 100644
--- a/src/log.rs
+++ b/src/log.rs
@@ -1,6 +1,6 @@
-extern crate append_log;
+extern crate append_log_other;
-use append_log::Log;
+use append_log_other::Log;
pub struct MultiLog {
} |
I didn't intend that package to have the same name as its dependency. Sorry for the noise. I guess it is better to close the issue then! Thank you for help. |
Summary: With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 Differential Revision: D24390815 fbshipit-source-id: 19b06e7f8d011da8f213c8e82de98d88d1cd0dd4
Summary: With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Differential Revision: D24390815 fbshipit-source-id: 8e2047715a83b50c3de4f8c74f0565799185f2ea
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: #15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
…acebookexperimental#15) Summary: Pull Request resolved: facebookexperimental#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
…acebook#15) Summary: Pull Request resolved: facebookexperimental/rust-shed#15 With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819 This diff also removes the TravisCI build as it was broken and unused for some time. Reviewed By: krallin Differential Revision: D24390815 fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
Problem
I'm getting an error when trying to run
cargo test --doc
on this (practically empty) project:https://github.com/indutny/append-multi-log
Steps
git clone git@github.com:indutny/append-multi-log.git
cd append-multi-log
cargo test --doc
Possible Solution(s)
No ideas, but I suppose it is somehow related to having docs (
///
comments) in the dependency?Notes
Output of
cargo version
:The platform is:
Rustc:
The text was updated successfully, but these errors were encountered: