-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit more info on --message-format=json #3319
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
8affa58
to
0aef97c
Compare
The full path should be fine - I don't have any separate need for the metadata hash. I haven't tried this yet - does it also emit the set of paths to native libraries (and frameworks, I guess, for generality) that the crate depends on? As a separate thing, is it possible to tell rustc not to incorporate a |
OK, I'm trying it out. It looks pretty close! I think I can probably replace my current set of hacks with this as-is. That said, some notes: It's a little odd I also need to specify It might be nice to include the build mode (release/debug), features and cfgs and/or the complete set of flags passed to rustc. Is the intent that the It would be helpful if "lib" type targets also included the paths to any native libraries they're dependent on: {
"filenames": [
"/Users/jsgf/git/cargo/target/release/deps/libopenssl_sys-5201f798d8034d0e.rlib"
],
"package_id": "openssl-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"reason": "compiler-artifact",
"target": {
"kind": [
"lib"
],
"name": "openssl-sys",
"src_path": "/Users/jsgf/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.1/src/lib.rs"
}
} I think this information is available if I:
But that depends on there having been a build-script. Do crates with native dependencies always have a build script? It would be more straightforward if the When I build cargo itself with {
"filenames": [
"/Users/jsgf/git/cargo/target/debug/deps/cargo-a8eb8e92f78bce89"
],
"package_id": "cargo 0.16.0 (path+file:///Users/jsgf/git/cargo)",
"reason": "compiler-artifact",
"target": {
"kind": [
"bin"
],
"name": "cargo",
"src_path": "src/bin/cargo.rs"
}
} The |
Also, when I get a compilation failure, I get a "reason: compiler-message" record, but then its followed by |
Seems ok to me once @jsgf is happy. |
I believe so, yes
Ah yeah I can definitely include that. I'll try to think something through here.
Indeed! (sorry for the almost nonexistent docs about this right now)
I hadn't explicitly thought of this, but yeah I would want this to be true in any case.
That should come up with the build script messages, but were those dropped? If there's library linkage included in the source then unfortunately Cargo doesn't have that information to print back :(
Most of the time, yes, although
Yeah this was a recent change which helps us cache a bit more (but we update the hardlinks still. I can update the path to print out the hardlink location, though, if you'd prefer. |
☔ The latest upstream changes (presumably #3310) made this pull request unmergeable. Please resolve the merge conflicts. |
0aef97c
to
308fb48
Compare
This adds more output on Cargo's behalf to the output of `--message-format=json`. Cargo will now emit a message when a crate is finished compiling with a list of all files that were just generated along with a message when a build script finishes executing with linked libraries and linked library paths. Closes rust-lang#3212
308fb48
to
9f6d798
Compare
Ok I've updated with profile information (debuginfo, debug asserts, opt level, etc) and features. @jsgf was there more info you're thinking of that you'd like to see? |
Ooh, looks good. I'll try to update my script to use it this afternoon.
|
In theory, yeah, although Cargo doesn't quite have support for that just yet. I'll switch that though I think as it's more future proof to use a number. |
Yeah, good. I got a successful build out of scripts modified to use this. |
Awesome! Let's land this then @bors: r=brson |
📌 Commit 9f6d798 has been approved by |
⌛ Testing commit 9f6d798 with merge 0116caa... |
💔 Test failed - status-appveyor |
@bors: retry
…On Mon, Dec 5, 2016 at 9:00 AM bors ***@***.***> wrote:
💔 Test failed - status-appveyor
<https://ci.appveyor.com/project/rust-lang-libs/cargo/build/1.0.527>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3319 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95NcNCcIa22aOpfIFRC_0aVg6OC9Qks5rFEMcgaJpZM4K6y3C>
.
|
⌛ Testing commit 9f6d798 with merge 75ab8ff... |
💔 Test failed - status-travis |
Looks like that failure was just a timeout. |
@bors: retry |
@bors: retry
Hmm... suspicious...
…On Mon, Dec 5, 2016 at 1:05 PM Jeremy Fitzhardinge ***@***.***> wrote:
@bors <https://github.com/bors>: retry
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3319 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95D8iKL_zLA2NgoBzjGBamSu3G2Inks5rFJidgaJpZM4K6y3C>
.
|
Emit more info on --message-format=json This adds more output on Cargo's behalf to the output of `--message-format=json`. Cargo will now emit a message when a crate is finished compiling with a list of all files that were just generated along with a message when a build script finishes executing with linked libraries and linked library paths. Closes #3212
☀️ Test successful - status-appveyor, status-travis |
Always produce artifact messages This changes `artifact` messages in several ways: * They are produced even for fresh builds * They used the path after hard linking (@jsgf talked about it in the end of #3319 (comment)) * Don't produce filenames if the compiler has not actually produced the binaries (`-Z-no-trans`).
This adds more output on Cargo's behalf to the output of
--message-format=json
. Cargo will now emit a message when a crate is finishedcompiling with a list of all files that were just generated along with a message
when a build script finishes executing with linked libraries and linked library
paths.
Closes #3212