When loading targets to compile, be sure to use the targets from the package
that's being passed down to the compilation step, not the one that was passed in
which is overridden.
Closes#1404
This fixes a number of bugs along the way:
* Submodules are now recursed into explicitly for packaging, fixing #943
* A whitelist has been implemented, fixing #880
* Git repos are now always used if there is a package that resides at the root,
not just if the current package resides at the root.
This commit cleans up cargo's error module to reduce the duplication of
`CargoError` and the standard library's `Error` trait. The `CargoError` trait
remains, but only has one methods, `is_human`.
A number of other modifications were made:
* ChainError was altered to work over unboxed closures
* Wrap and Require were removed as they're duplicates of the ChainError
functionality.
* Many public error types are now private from util::errors as they're only
returned as boxed trait objects.
* The `concrete` was removed, all calls to `make_human` are now done through a
newtype `Human` wrapper.
* Cargo's custom `try!` macro was removed.
It's really hard to find out any information about a project if it
doesn't have any of these.
As a bonus I added a shebang to .travis.install.deps.sh so the README
instructions actually work.
Closes#998
The logic for "not recursing into `target`" was pretty hokey and needed
replacement. This commit also unfies the paths a bit to ensure that the main
loop is the same part that adds the root package itself.
This reorganization ends up closing #937
The `target` directory was erroneously being used from the crate root rather
than the root of the package directory itself, leading to packages not actually
testing what's precisely being published.
The `target` directory was erroneously being used from the crate root rather
than the root of the package directory itself, leading to packages not actually
testing what's precisely being published.
It's very bad practice to not have a license in a
published (theoretically) open-source package, since the default
position is all-rights-reserved. Hence, cargo will now warn if this
metadata field is missing from the manifest when creating a package.
Similarly, a lack of description makes using crates.io less nice, since
there's no indication of what a package does other than the name (and
possibly documentation etc. links, but these are often missing too).
These metadata fields are not immediately obvious so `cargo` can be a
little intelligent and provide some hints that they exist.
Closes#902.
At the same time this commit renames the `.tar.gz` extension to `.crate`. This
helps our perception on Windows as we're not trying to leave them out in the
dark, and we'd also like the ability to modify the format later in the future.
Closes#777
This commit includes a laundry list of updates and tweaks to reflect the current
API of the registry:
* `registry.host` has been renamed to `registry.index`
* New top-level manifest keys are now accepted:
* `homepage` - url
* `documentation` - url
* `repository` - url
* `description` - a markdown-less blurb
* `license` - string (verified by the registry on upload)
* `keywords` - string array
* `readme` - string pointing at a file
* Authors are now uploaded to the registry
* The upload format to the registry has changed to a body json payload
* Unpacking tarballs respects the executable bit for scripts and such.
* Downloading now follows redirects to go to S3.
* The download URL for a package has changed slightly.
* Verify path dependencies have a version listed when being uploaded
* Rename `upload` to `publish`
* Rename `ops::cargo_upload` to `ops::registry`
* Add a new `registry` package for interoperating with the registry
* Add the ability to modify owners via `cargo owner`
* Add a `readme` key to the manifest, and upload its contents to the registry.
* Add the ability to yank crates and their versions
* When packaging a library, verify that it builds from the packaged source by
unpacking the tarball and simulate running `cargo build` inside of it.
This command will assemble the current package into a tarball ready for
uploading to the cargo registry. Currently no further verification is done
beyond packaging the local repository into a tarball, but in the future this
could execute other operations such as api stability tools.