rust-lang/cargo — pull request #255 by michaelsproul (2014-07-24 11:39:27+00:00)
Title: Improve the error message for missing dependencies.

I've changed the error message that appears when a dependency can't be located. With my changes, mismatches between Cargo.toml dependency names and actual dependency package names are (slightly) more apparent. This doesn't change the error that appears when a dependency has an invalid source.

Example:

```toml
# Cargo.toml
...
[dependencies.foo]

path = "foo"
```

```toml
# foo/Cargo.toml
[package]

name = "not_foo"
```

Previously:

```
$ cargo build
No package named Dependency { name: foo, namespace: file:/home/michael/cargo_test, req: *, transitive: true } found
```

Now:

```
$ cargo build
No package named 'foo' found. Ensure that the dependency name in Cargo.toml matches the package name of the dependency.
```

I removed the printing of the `Dependency` struct, but maybe some of the info there could be reshown in verbose mode?

In verbose mode I think it would be also nice to print a list of packages that Cargo *does* know about. Something like: "Known packages amongst dependencies: not_foo, etc"