Commit 8bfc3fb
authored
chore(license): replace cargo-bundle-licenses with dd-rust-license-tool (#1837)
## What does this PR do?
Replaces `cargo-bundle-licenses` with `dd-rust-license-tool` for third-party license tracking. This is the official Datadog tool for this purpose, already used by `datadog-lambda-extension` and other Datadog Rust projects.
## Motivation
The current `LICENSE-3rdparty.yml` file is 53,656 lines (4.8 MB) because `cargo-bundle-licenses` embeds full license texts for every dependency. This causes:
- **Frequent merge conflicts** on the first line (`root_name`) and throughout the file whenever dependencies change
- **Complex CI pipeline** requiring `sed` path normalization and manual `diff` to validate
- **Large diffs** that obscure actual code changes in PRs
`dd-rust-license-tool` generates a CSV with one line per dependency (component, origin, license SPDX ID, copyright), producing a 556-line (60 KB) file.
| | Before | After |
|---|---|---|
| Tool | `cargo-bundle-licenses` | `dd-rust-license-tool` |
| Format | YAML (full license texts) | CSV (SPDX IDs only) |
| File size | 4.8 MB (53,656 lines) | 60 KB (556 lines) |
| CI check | `cargo bundle-licenses` + `sed` + `diff` | `dd-rust-license-tool check` |
| Path normalization | Required (`sed` to handle registry path differences) | Not needed |
| Merge conflict risk | High | Low |
## Changes
- `LICENSE-3rdparty.yml` removed
- `LICENSE-3rdparty.csv` added (generated by `dd-rust-license-tool write`)
- `license-tool.toml` added with overrides for 4 crates missing metadata (`crunchy`, `value-bag-sval2`, `value-bag-serde1`, `stringmetrics`)
- `.github/workflows/lint.yml` simplified: replaced the `cargo-bundle-licenses` + sed + diff pipeline with `dd-rust-license-tool check`
- `scripts/update_license_3rdparty.sh` updated to use `dd-rust-license-tool write`
## How to test the change?
```
cargo install dd-rust-license-tool
dd-rust-license-tool check
```
To regenerate after dependency changes:
```
dd-rust-license-tool write
# or
./scripts/update_license_3rdparty.sh
```
Co-authored-by: jordan.gonzalez <jordan.gonzalez@datadoghq.com>1 parent 02d95c0 commit 8bfc3fb
7 files changed
Lines changed: 576 additions & 53715 deletions
File tree
- .github
- workflows
- builder/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 78 | | |
88 | 79 | | |
89 | | - | |
| 80 | + | |
90 | 81 | | |
91 | 82 | | |
92 | 83 | | |
93 | | - | |
94 | | - | |
| 84 | + | |
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 88 | + | |
101 | 89 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
142 | 94 | | |
143 | 95 | | |
144 | 96 | | |
| |||
0 commit comments