mirror of
https://github.com/rust-lang/cargo
synced 2024-08-28 03:39:31 +00:00
Auto merge of #9911 - rust-lang:revert-9686-rustin-patch-error, r=alexcrichton
Revert "When a dependency does not have a version, git or path, fails directly" Reverts rust-lang/cargo#9686 We discussed, and felt like this change wasn't all that important, and a few people have mentioned that it caused problems for them. Closes #9885
This commit is contained in:
commit
f69305e005
|
@ -1762,11 +1762,14 @@ impl<P: ResolveToPath> DetailedTomlDependency<P> {
|
|||
kind: Option<DepKind>,
|
||||
) -> CargoResult<Dependency> {
|
||||
if self.version.is_none() && self.path.is_none() && self.git.is_none() {
|
||||
bail!(
|
||||
let msg = format!(
|
||||
"dependency ({}) specified without \
|
||||
providing a local path, Git repository, or version to use.",
|
||||
providing a local path, Git repository, or \
|
||||
version to use. This will be considered an \
|
||||
error in future versions",
|
||||
name_in_toml
|
||||
);
|
||||
cx.warnings.push(msg);
|
||||
}
|
||||
|
||||
if let Some(version) = &self.version {
|
||||
|
|
|
@ -763,14 +763,10 @@ fn empty_dependencies() {
|
|||
Package::new("bar", "0.0.1").publish();
|
||||
|
||||
p.cargo("build")
|
||||
.with_status(101)
|
||||
.with_stderr(
|
||||
.with_stderr_contains(
|
||||
"\
|
||||
[ERROR] failed to parse manifest at `[..]`
|
||||
|
||||
Caused by:
|
||||
dependency (bar) specified without providing a local path, Git repository, or version \
|
||||
to use.
|
||||
warning: dependency (bar) specified without providing a local path, Git repository, or version \
|
||||
to use. This will be considered an error in future versions
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
|
Loading…
Reference in a new issue