Commit graph

27 commits

Author SHA1 Message Date
Seth Falcon d33da5492d Add test for ignoring nested self packages 2015-07-05 11:34:43 -07:00
Ivan Ukhov 036d6f6d16 tests: add a test for submodule packaging 2015-06-02 10:55:00 -04:00
Alex Crichton a8e9ce22c1 Scan untracked files in git for packaging/deps
Closes #797
Closes #1575
2015-05-05 15:58:00 -07:00
Alex Crichton 964e72ffc0 Update to rust 2015-03-26 2015-03-26 11:59:30 -07:00
Alex Crichton 350bd8d2bf Don't intermingle targets between packages
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
2015-03-11 13:32:59 -07:00
Alex Crichton a6dad62221 Update to rust master and std::{io, path} 2015-02-27 15:34:13 -08:00
Gabriel Souza Franco af45e08862 std::io → std::old_io 2015-01-30 16:03:53 -02:00
Alex Crichton 553211119b Update to rust master 2015-01-13 14:11:20 -08:00
Alex Crichton 5935ec1dd8 Update how a PathSource is traversed for git repos
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.
2015-01-08 12:51:14 -08:00
Alex Crichton 9ed3a6ea1d Clean up Cargo's util::errors module
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.
2014-12-29 18:59:15 -08:00
Alex Crichton 157d639afc Update rust and all deps 2014-12-19 20:55:17 -08:00
Steven Fackler 9673f7298c Warn if none of documentation, homepage or repository are provided
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
2014-12-15 23:41:50 -08:00
Alex Crichton 5acb5f567b Add support for a license-file manifest key
This key will support projects with nonstandard licenses and the registry will
display the license as "nonstandard".

Closes #940
2014-11-25 09:33:16 -08:00
Alex Crichton c84bc16b35 Clean up code around the crawling of a directory
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
2014-11-24 18:58:39 -08:00
bors 65bdc5755c auto merge of #944 : alexcrichton/cargo/test-some-packages, r=brson
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.
2014-11-25 00:00:54 +00:00
Jakub Bukaj df9cf06663 Update to newest Rust 2014-11-23 17:02:45 -05:00
Alex Crichton 6e81812eaa Ensure crates are tested after packaged
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.
2014-11-20 22:48:18 -08:00
bors b3ce593914 auto merge of #907 : alexcrichton/cargo/update-curl, r=alexcrichton 2014-11-19 07:12:26 +00:00
Alex Crichton 38d14a59c6 Update all dependencies to Rust master 2014-11-18 23:04:24 -08:00
Huon Wilson 5db1316a6b Warn about missing license/description in cargo package.
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.
2014-11-19 13:17:59 +11:00
Alex Crichton 229e1e4354 Implement -l/--list for cargo package
This provides a method of listing the files that will be in a package without
actually creating one.

Closes #855
2014-11-13 17:29:35 -08:00
Alex Crichton 291c774763 Move generated tarballs under target/package
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
2014-11-05 11:40:15 -08:00
Alex Crichton 9fba127e4f Update how cargo talks to the registry
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.
2014-10-27 12:40:23 -07:00
Alex Crichton ce57c09b66 Fix tests on windows 2014-09-16 12:05:21 -07:00
Alex Crichton eccdcae0c8 More and more tests (cargo upload) 2014-09-16 12:05:21 -07:00
Alex Crichton 97f073ef10 Test the output of cargo package 2014-09-16 12:05:21 -07:00
Alex Crichton 69c16fc6c8 Implement cargo-package
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.
2014-08-26 19:03:12 -07:00