From d20f5d5fc563c6f399dd2304bd090cf6b5a2d099 Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Sat, 2 Jul 2022 09:33:31 +0200 Subject: [PATCH 1/4] Add missing manifest_path field to Artifact --- src/messages.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/messages.rs b/src/messages.rs index 0d086d3c..c73ad52b 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -34,6 +34,8 @@ pub struct ArtifactProfile { pub struct Artifact { /// The package this artifact belongs to pub package_id: PackageId, + /// Path containing the `Cargo.toml` + pub manifest_path: Utf8PathBuf, /// The target this artifact was compiled for pub target: Target, /// The profile this artifact was compiled with From a0510cd98724b640a72f0eb34ae6efdeaaaf09a8 Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Sat, 2 Jul 2022 09:53:28 +0200 Subject: [PATCH 2/4] Fix test samples --- tests/test_samples.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_samples.rs b/tests/test_samples.rs index 27a02f58..7b00c127 100644 --- a/tests/test_samples.rs +++ b/tests/test_samples.rs @@ -532,9 +532,9 @@ fn current_dir() { fn parse_stream_is_robust() { // Proc macros can print stuff to stdout, which naturally breaks JSON messages. // Let's check that we don't die horribly in this case, and report an error. - let json_output = r##"{"reason":"compiler-artifact","package_id":"chatty 0.1.0 (path+file:///chatty-macro/chatty)","target":{"kind":["proc-macro"],"crate_types":["proc-macro"],"name":"chatty","src_path":"/chatty-macro/chatty/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/chatty-macro/target/debug/deps/libchatty-f2adcff24cdf3bb2.so"],"executable":null,"fresh":false} + let json_output = r##"{"reason":"compiler-artifact","package_id":"chatty 0.1.0 (path+file:///chatty-macro/chatty)","manifest_path":"chatty-macro/Cargo.toml","target":{"kind":["proc-macro"],"crate_types":["proc-macro"],"name":"chatty","src_path":"/chatty-macro/chatty/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/chatty-macro/target/debug/deps/libchatty-f2adcff24cdf3bb2.so"],"executable":null,"fresh":false} Evil proc macro was here! -{"reason":"compiler-artifact","package_id":"chatty-macro 0.1.0 (path+file:///chatty-macro)","target":{"kind":["lib"],"crate_types":["lib"],"name":"chatty-macro","src_path":"/chatty-macro/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/chatty-macro/target/debug/libchatty_macro.rlib","/chatty-macro/target/debug/deps/libchatty_macro-cb5956ed52a11fb6.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"chatty-macro 0.1.0 (path+file:///chatty-macro)","manifest_path":"chatty-macro/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"chatty-macro","src_path":"/chatty-macro/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/chatty-macro/target/debug/libchatty_macro.rlib","/chatty-macro/target/debug/deps/libchatty_macro-cb5956ed52a11fb6.rmeta"],"executable":null,"fresh":false} "##; let mut n_messages = 0; let mut text = String::new(); From d69b731b45b600e46e04dbfe347d9c90e204875c Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Sat, 2 Jul 2022 09:53:44 +0200 Subject: [PATCH 3/4] Updated changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4028f7b..fcc0b264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ - Removed re-exports for `BuildMetadata` and `Prerelease` from `semver` crate. +### Fixed + +- Added missing `manifest_path` field to `Artifact`. Fixes #187. + ## [0.15.0] - 2022-06-22 ### Added From b2295365662b83779515738dee998c41c0ddb07b Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Sat, 2 Jul 2022 11:01:09 +0200 Subject: [PATCH 4/4] Fix wrong doc comment --- src/messages.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages.rs b/src/messages.rs index c73ad52b..0b7d0f15 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -34,7 +34,7 @@ pub struct ArtifactProfile { pub struct Artifact { /// The package this artifact belongs to pub package_id: PackageId, - /// Path containing the `Cargo.toml` + /// Path to the `Cargo.toml` file pub manifest_path: Utf8PathBuf, /// The target this artifact was compiled for pub target: Target,