Reverted the "kind" field to the previous value.#3668
Conversation
Added a new field named "crate_types".
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
|
I believe previously |
|
@alexcrichton, |
|
I will fix it. |
|
@KalitaAlexey yes, it was changed. If you make a small example library with two crate-types, metadata prints this "kind" : [
"rlib",
"dylib"
] |
|
@alexcrichton, |
|
@alexcrichton, I got: |
| "src_path": "[..][/]foo[/]src[/]lib.rs" | ||
| }, | ||
| { | ||
| "kind": [ "example" ], |
There was a problem hiding this comment.
@alexcrichton,
The test checks what you asked.
|
As I mentioned before, we'll need to preserve the existing stable semantics of |
|
@alexcrichton, |
|
Currently this PR will emit at most one entry in the array of the That prints: |
|
@bors: r+ Thanks! |
|
📌 Commit 582bc55 has been approved by |
Reverted the "kind" field to the previous value. Added a new field named "crate_types". Fixes #3654 After this PR `cargo metadata` would output: ```json { "packages": [ { "targets": [ { "kind": ["lib"], "crate_types": ["lib"] }, { "kind": ["example"], "crate_types": ["staticlib"] } ] } ] } ``` I have added tests.
|
☀️ Test successful - status-appveyor, status-travis |
|
I'm curious, will this get merged to the beta channel/rustc-1.16? I'm not familiar with how rust/cargo releases and branches are handled. |
|
@ehuss oh is this bug on beta? I thought it was only on nightly? |
|
The original commit that added support for examples as libraries (#3556) was added to master around Jan 20. I think the rust-1.16.0 branch was made around Feb 1. This fix was committed to master on Feb 11, after the rust-1.16.0 branch was made. I assume beta is being pulled from the rust-1.16.0 branch. |
|
@ehuss ah yes I'll backport, thanks for the ping! |
|
@alexcrichton, |
|
Yes |
|
This is not actually in the 1.16 release as the backport occured after the build. |
Added a new field named "crate_types".
Fixes #3654
After this PR
cargo metadatawould output:{ "packages": [ { "targets": [ { "kind": ["lib"], "crate_types": ["lib"] }, { "kind": ["example"], "crate_types": ["staticlib"] } ] } ] }I have added tests.