Development dependencies are traversed during the resolution process, causing
them to be returned as the list of dependencies for a package in terms of
resolution. The compilation phase would then filter these out depending on the
dependency's transitivity, but this was incorrectly accounted for when the
dependency showed up multiple times in a few lists.
This commit fixes this behavior by updating the filtering logic to ensure that
only activated optional dependencies (those whose feature names are listed) are
compiled.
Closes#1805
Dependencies aren't necessarily unique per name as the same dependency can show
up multiple times in various dependency kind lists, so it's not quite right to
use a hash map anyway.
This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:
* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)
There are also a few minor updates made as part of this commit as well:
* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program
This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:
* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)
There are also a few minor updates made as part of this commit as well:
* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program
Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.
Closes#1751
If a package contains a subdirectory that contains a copy of
itself (strange, but encountered in the wild in the context of an OS
package build tool), cargo was failing with a non-descriptive "An
unknown error occurred" (or "no package found in source" with
--verbose).
Since nested packages use the root path, such a package will have an
identical package_id to the root package. With this patch, we keep the
first occurance of a given package_id rather than overwritting --
effectively ignoring the nested package with duplicated name. A warn!
message is printed.
Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.
Closes#1751
Adds a `-q|--quiet` option to all cargo commands that suppresses output from
cargo. In the case of `cargo run`, output from the project executable will
still be shown.