Skip to content
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

chore(dev): Install dd-rust-license-tool from crates.io #18025

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md).

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
[dd-rust-license-tool](https://github.com/DataDog/rust-license-tool.git) and can be updated using
`cargo vdev build licenses`.

## Next steps
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Loosely, you'll need the following:
- **To run `make test`:** Install [`cargo-nextest`](https://nexte.st/)
- **To run integration tests:** Have `docker` available, or a real live version of that service. (Use `AUTOSPAWN=false`)
- **To run `make check-component-features`:** Have `remarshal` installed.
- **To run `make check-licenses` or `cargo vdev build licenses`:** Have `rust-license-tool` [installed](https://github.com/DataDog/rust-license-tool).
- **To run `make check-licenses` or `cargo vdev build licenses`:** Have `dd-rust-license-tool` [installed](https://github.com/DataDog/rust-license-tool).
- **To run `cargo vdev build component-docs`:** Have `cue` [installed](https://cuelang.org/docs/install/).

If you find yourself needing to run something inside the Docker environment described above, that's totally fine, they won't collide or hurt each other. In this case, you'd just run `make environment-generate`.
Expand Down
4 changes: 2 additions & 2 deletions scripts/environment/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fi
if ! cargo deny --version >& /dev/null ; then
rustup run stable cargo install cargo-deny --force --locked
fi
if ! rust-license-tool --help >& /dev/null ; then
cargo install --git https://github.com/DataDog/rust-license-tool
if ! dd-rust-license-tool --help >& /dev/null ; then
rustup run stable cargo install dd-rust-license-tool --version 1.0.1 --force --locked
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to lock down the version? We don't on other tools.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do actually lock down all of the others (see the lines above this one) except cargo-deny, which I'd argue we should be locking too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL took the line above to be exemplary. Fair enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 I figured that was probably the case since that was the only one showing in the diff by default.

fi

# Currently fixing this to version 0.30 since version 0.31 has introduced
Expand Down
2 changes: 1 addition & 1 deletion vdev/src/commands/build/licenses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pub struct Cli {}

impl Cli {
pub fn exec(self) -> Result<()> {
app::exec("rust-license-tool", ["write"], true)
app::exec("dd-rust-license-tool", ["write"], true)
}
}
2 changes: 1 addition & 1 deletion vdev/src/commands/check/licenses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct Cli {}

impl Cli {
pub fn exec(self) -> Result<()> {
app::exec("rust-license-tool", ["check"], true).map_err(|err| {
app::exec("dd-rust-license-tool", ["check"], true).map_err(|err| {
info!("Run `cargo vdev build licenses` to regenerate the file");
err
})
Expand Down