Skip to content

Fix REUSE resolution and SPDX extraction - #14

Merged
andrew merged 2 commits into
mainfrom
fix/extraction-and-docs
Oct 24, 2026
Merged

andrew merged 2 commits into
mainfrom
fix/extraction-and-docs

Conversation

@andrew

@andrew andrew commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Sidecars previously bypassed TOML precedence, and project resolution loaded only the root REUSE.toml. Load nested annotations relative to their directories, apply outermost overrides and ancestor aggregates, and let closest annotations fill missing licence and copyright fields. Sidecars also participate in DEP5 aggregation.

This changes the public API: Project.ReuseTOMLs replaces Project.ReuseTOML with a map keyed by relative directory ("." for the root). Project roots are resolved to absolute paths, lookups reject nonlocal paths, and returned TOML metadata owns its slices so callers cannot alter later results.

Fix extraction dropping valid UTF-8 when the 8 KiB probe splits a character, and empty SPDX tags capturing the next line. Remove unnecessary regex scanning and copy extracted values so short metadata does not retain whole inputs. Add regression coverage, benchmarks, compiled examples, and documentation of precedence, input completeness, and the remaining scope and provenance limits.

@andrew
andrew merged commit 5f0722d into main Oct 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant