Commit graph

23 commits

Author SHA1 Message Date
Ashe Connor 76a69b4cb8
transmit: send README filename as well as content 2017-10-17 16:04:34 +11:00
Simon Sapin f38c53f5c3 Make manifest serialization deterministic
Fixes #4326

`cargo package` (and so `cargo publish`) parses a crate’s `Cargo.toml`,
makes some modifications, and re-serializes it.
Because the `TomlManifest` struct uses `HashMap`
with its default `RandomState` hasher,
the maps’ iteration order changed on every run.

As a result, when using `cargo vendor`,
updating a dependency would generate a diff larger than necessary,
with non-significant order-changes obscuring significant changes.

This replaces some uses of `HashMap` with `BTreeMap`,
whose iteration order is deterministic (based on `Ord`).
2017-10-02 12:09:54 +02:00
Natalie Boehm 8150b602ba add boolean to struct to support what crates is sending
in case an old version of cargo is being used. the old
version should be able to decode the boolean and ignore
the string.
2017-09-28 15:23:54 -04:00
Natalie Boehm 321c0cd383 change add_owners to return a string and transmit the status message passed from the owner_add function in crates.io 2017-09-27 15:08:17 -04:00
Natalie Boehm e53d596589 i don't know if this works but i should commit 2017-09-26 17:01:50 -04:00
Guillaume Gomez 638ac11171 Update error-chain dep for crates-io as well 2017-07-28 23:37:54 +02:00
jluner e95044e313 Add error-chain errors
Convert CargoResult, CargoError into an implementation provided by error-chain. The previous is_human machinery is mostly removed; now errors are displayed unless of the Internal kind, verbose mode will print all errors.
2017-05-24 21:14:04 -05:00
Alex Crichton a5a298f1fd Migrate from rustc-serialize to Serde
This commit migrates Cargo as much as possible from rustc-serialize to
Serde. This not only provides an excellent testing ground for the toml
0.3 release but it also is a big boost to the speed of parsing the JSON
bits of the registry.

This doesn't completely excise the dependency just yet as docopt still
requires it along with handlebars. I'm sure though that in time those
crates will migrate to serde!
2017-02-22 10:29:40 -08:00
Jake Goulding f5f4c417f7 Upload badge metadata specified in the manifest 2017-01-17 16:39:49 -05:00
Carol (Nichols || Goulding) f697b8c68d Add more structure to the warnings returned from crates.io publish 2016-12-05 12:36:44 -05:00
Carol (Nichols || Goulding) 7dd0f932a8 Have a fallback for an empty response
This happens in tests.
2016-12-03 11:12:52 -05:00
Carol (Nichols || Goulding) 154cc0aa54 Warn when crates.io sends back invalid category slugs 2016-12-03 11:12:52 -05:00
Carol (Nichols || Goulding) 0f01d9bd4d Upload categories specified in the manifest 2016-12-03 11:12:52 -05:00
Sascha Grunert 82655b461f Changed try! macros to ? operator
Since the stabilization of the ? operator (release 1.13.0)
the ? operator should be used to use idiomatic Rust.
2016-11-11 14:25:20 +01:00
Alex Crichton f7d213e744 Update to curl 0.3 2016-06-04 23:48:05 -07:00
Alex Crichton a9fd1c2c05 Change Config::target_dir to return Filesystem
This is a shared directory among multiple Cargo processes so access to it needs
to be properly synchronized. This commit changes the API of `Config::target_dir`
and then propagates the changes outward as necessary.

One fallout of this change is now we allow release/debug builds to proceed in
parallel.
2016-04-05 15:44:56 -07:00
Jesús Espino 3973a72c31 Remove deprecated usage of SliceConcatExt::connect 2016-03-09 09:24:39 +01:00
Jesús Espino a4a44538e5 Remove unwraps from crates-io lib 2016-03-08 18:24:59 +01:00
Jesús Espino 134edb20c1 Adding --limit usage suggestion on search results (#2402) 2016-03-08 09:31:26 +01:00
Jesús Espino 53c9374c9f Add limit parameter to search command (fix issue #2402) 2016-03-06 17:46:32 +01:00
Abhishek Chanda a615a7e531 Improve the error message when a crate cannot be found
Closes #1892
2015-08-12 11:49:51 -07:00
Alexis Beingessner fc68cf52a9 add missing Option to avatar 2015-08-05 11:33:56 -07:00
Alex Crichton a4c5438431 Tweak metadata to publish Cargo on crates.io
This commit tweaks some metadata here and there to publish Cargo on crates.io.

* License fields are added to Cargo.tomls
* `registry` was renamed to `crates-io`
* API docs for the `cargo` crate are now generated via `make doc`
2015-07-24 15:07:01 -07:00
Renamed from src/registry/lib.rs (Browse further)