Skip to content

Commit f8a7123

Browse files
committed
address review feedback
1 parent f78e646 commit f8a7123

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

config.toml.example

+7-4
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,14 @@ changelog-seen = 2
255255
# Defaults to the Python interpreter used to execute x.py
256256
#python = "python"
257257

258-
# The path to the REUSE executable to use. REUSE will be used to gather
259-
# the licensing information of the codebase.
258+
# The path to the REUSE executable to use. Note that REUSE is not required in
259+
# most cases, as our tooling relies on a cached (and shrinked) copy of the
260+
# REUSE output present in the git repository and in our source tarballs.
260261
#
261-
# If this is omitted, the cached licensing information present in the source
262-
# tarball will have to be present.
262+
# REUSE is only needed if your changes caused the overral licensing of the
263+
# repository to change, and the cached copy has to be regenerated.
264+
#
265+
# Defaults to the "reuse" command in the system path.
263266
#reuse = "reuse"
264267

265268
# Force Cargo to check that Cargo.lock describes the precise dependency

src/tools/collect-license-metadata/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() -> Result<(), Error> {
2222
std::fs::write(
2323
&dest,
2424
&serde_json::to_vec_pretty(&serde_json::json!({
25-
"files": crate::path_tree::strip_interning(tree, &interner),
25+
"files": crate::path_tree::expand_interned_licenses(tree, &interner),
2626
}))?,
2727
)?;
2828

src/tools/collect-license-metadata/src/path_tree.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ pub(crate) fn build(mut input: Vec<(PathBuf, LicenseId)>) -> Node<LicenseId> {
270270
Node::Root { childs }
271271
}
272272

273-
pub(crate) fn strip_interning(
273+
/// Convert a `Node<LicenseId>` into a `Node<&License>`, expanding all interned license IDs with a
274+
/// reference to the actual license metadata.
275+
pub(crate) fn expand_interned_licenses(
274276
node: Node<LicenseId>,
275277
interner: &LicensesInterner,
276278
) -> Node<&License> {

0 commit comments

Comments
 (0)