From 10095c3fd38aa5cdc5f7e062d80f74cff10c7f70 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Tue, 16 May 2023 09:55:06 -0700 Subject: [PATCH 1/3] chore(dev): Add note about generating licenses to CONTRIBUTING.md Also have the check command output how to fix it to guide contributors. Signed-off-by: Jesse Szwedko --- docs/CONTRIBUTING.md | 8 ++++++++ vdev/src/commands/check/licenses.rs | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8018134b69bca..cebda9652551b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -25,6 +25,7 @@ Vector team member will find this document useful. - [Flakey tests](#flakey-tests) - [Test harness](#test-harness) - [Deprecations](#deprecations) + - [Dependencies](#dependencies) - [Next steps](#next-steps) - [Legal](#legal) - [Contributor License Agreement](#contributor-license-agreement) @@ -184,6 +185,13 @@ any pull request with: When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md). +### Dependencies + +When adding, modifying, or removing a dependency in Vector you may find that you need to update the +inventory of third-party licenses maintained in `LICENSE-3rdparty.csv`. This file is generated using +[rust-license-tool](https://github.com/DataDog/rust-license-tool.git) and can be updated using +`cargo vdev build licenses`. + ## Next steps As discussed in the [`README`](README.md), you should continue to the following diff --git a/vdev/src/commands/check/licenses.rs b/vdev/src/commands/check/licenses.rs index d9f13fb09db48..e567afa832daa 100644 --- a/vdev/src/commands/check/licenses.rs +++ b/vdev/src/commands/check/licenses.rs @@ -9,6 +9,9 @@ pub struct Cli {} impl Cli { pub fn exec(self) -> Result<()> { - app::exec("rust-license-tool", ["check"], true) + app::exec("rust-license-tool", ["check"], true).map_err(|err| { + eprintln!("Run `cargo vdev build licenses` to regenerate the file"); + err + }) } } From f04a068b70dee589bccfcb328c8b614b11a7f956 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Tue, 16 May 2023 10:30:44 -0700 Subject: [PATCH 2/3] PR feedback Signed-off-by: Jesse Szwedko --- .github/actions/spelling/expect.txt | 1 + vdev/src/commands/check/licenses.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index cfd7faf83269d..ab22619527338 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -678,6 +678,7 @@ liblogging librdkafka libvector libxxhash +LICENSE-3rdparty.csv linting listenfd litstr diff --git a/vdev/src/commands/check/licenses.rs b/vdev/src/commands/check/licenses.rs index e567afa832daa..9a483a2383422 100644 --- a/vdev/src/commands/check/licenses.rs +++ b/vdev/src/commands/check/licenses.rs @@ -10,7 +10,7 @@ pub struct Cli {} impl Cli { pub fn exec(self) -> Result<()> { app::exec("rust-license-tool", ["check"], true).map_err(|err| { - eprintln!("Run `cargo vdev build licenses` to regenerate the file"); + info!("Run `cargo vdev build licenses` to regenerate the file"); err }) } From 9b19b926fd44003df685d1851f7b483df6957e86 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Tue, 16 May 2023 11:32:07 -0700 Subject: [PATCH 3/3] fix spelling Signed-off-by: Jesse Szwedko --- .github/actions/spelling/expect.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index ab22619527338..a21bb9d750a9a 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -678,7 +678,6 @@ liblogging librdkafka libvector libxxhash -LICENSE-3rdparty.csv linting listenfd litstr @@ -1015,6 +1014,7 @@ rawconfig rawstring rbaz rdkafka +rdparty rdr readnone rebuffer