Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Consider using cargo_metadata instead of cargo crate #20

Closed
malbarbo opened this issue Sep 27, 2017 · 6 comments · Fixed by #86
Closed

Consider using cargo_metadata instead of cargo crate #20

malbarbo opened this issue Sep 27, 2017 · 6 comments · Fixed by #86

Comments

@malbarbo
Copy link

It take too long to compile cargo. An alternative is to use cargo_metadata, which offers an api over the cargo metadata command.

@sfackler
Copy link
Owner

I'd love to do this, but the last time I looked into it, the metadata resolution info didn't include the dependency kinds, unfortunately.

@malbarbo
Copy link
Author

It seems that dependency kinds are included https://docs.rs/cargo_metadata/0.3.0/cargo_metadata/enum.DependencyKind.html

@sfackler
Copy link
Owner

Not in the Resolve: https://docs.rs/cargo_metadata/0.3.0/cargo_metadata/struct.Resolve.html

@sfackler
Copy link
Owner

Oh wait, I think I'm being silly. The Resolve cross references into the package set!

@sfackler
Copy link
Owner

sfackler commented Oct 16, 2017

It does look like cargo-metadata is missing controls for --all-features, --no-default-features, and --features though.

EDIT: and --frozen and --locked.

@sfackler
Copy link
Owner

These are also blockers:

rust-lang/cargo#4631
rust-lang/cargo#4632

sfackler added a commit that referenced this issue Dec 30, 2019
This both makes the crate compile way faster and avoids having to touch
tons of unstable, undocumented cargo internals. This requires Rust 1.41
(the current beta) for some cargo-metadata features.

There are some subtle differences in the new output (particularly in
handling dependencies between crates in workspaces), but they're pretty
minor.

Closes #73
Closes #69
Closes #66
Closes #65
Closes #63
Closes #61
Closes #57
Closes #20
sfackler added a commit that referenced this issue Dec 30, 2019
This both makes the crate compile way faster and avoids having to touch
tons of unstable, undocumented cargo internals. This requires Rust 1.41
(the current beta) for some cargo-metadata features.

There are some subtle differences in the new output (particularly in
handling dependencies between crates in workspaces), but they're pretty
minor.

Closes #73
Closes #69
Closes #66
Closes #65
Closes #63
Closes #61
Closes #57
Closes #20
sfackler added a commit that referenced this issue Dec 30, 2019
This both makes the crate compile way faster and avoids having to touch
tons of unstable, undocumented cargo internals. This requires Rust 1.41
(the current beta) for some cargo-metadata features.

There are some subtle differences in the new output (particularly in
handling dependencies between crates in workspaces), but they're pretty
minor.

Closes #73
Closes #69
Closes #66
Closes #65
Closes #63
Closes #61
Closes #57
Closes #20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants