Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmetadata: add --no-deps option #2359
Conversation
rust-highfive
assigned
huonw
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
rust-highfive
commented
Feb 5, 2016
|
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
alexcrichton
and unassigned
huonw
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
|
Instead of different encodable formats, perhaps we could tweak the existing one to look like: pub struct ExportInfo {
packages: Vec<Package>,
resolve: Option<MetadataResolve>,
version: u32,
} That way with |
matklad
force-pushed the
matklad:metadata-no-deps
branch
2 times, most recently
from
46c0eae
to
f3ba93e
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
Makes perfect sense, PR updated. |
alexcrichton
reviewed
Feb 5, 2016
| @@ -22,16 +23,34 @@ pub struct OutputMetadataOptions<'a> { | |||
| /// used versions - considering overrides - and writes all dependencies in a JSON | |||
| /// format to stdout. | |||
| pub fn output_metadata(opt: OutputMetadataOptions, config: &Config) -> CargoResult<ExportInfo> { | |||
| assert_eq!(opt.version, VERSION); | |||
This comment has been minimized.
This comment has been minimized.
alexcrichton
Feb 5, 2016
Member
Oh actually, while you're at it, can you change this assertion to a nicer error? For example something along the lines of:
if opt.version != VERSION {
bail!("metadata version {} not supported, only {} is currently supported", opt.version, VERSION);
}
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
matklad
Feb 5, 2016
Author
Member
Huh, I somehow thought that docopt should check the version automatically. Fixed.
matklad
force-pushed the
matklad:metadata-no-deps
branch
from
f3ba93e
to
80e3c05
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors: retry On Fri, Feb 5, 2016 at 12:50 PM, bors notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
|
|
matklad commentedFeb 5, 2016
closes #2356. The output is not exactly the same as with
read-manifest, because I wanted to include theversionfield.Tests and implementation is a copy-paste from
read-manifestexcept that this line is omited, becauseroot_packagedoes update anyway.