Skip to content

Fix REUSE resolution and SPDX extraction - #14

Open
andrew wants to merge 2 commits into
mainfrom
fix/extraction-and-docs
Open

andrew wants to merge 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.

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