Commit bb602b4
committed
perf: bulk-insert licenses and maintainers
This is a rather large change that does multiple things at once:
- Rename a few helpers
- Deduplicate derivations by degrees of freedom
- Improve accuracy of time measurement
We now capture the entire processing time for each data type separately.
- Only add maintainers and licenses from the rolling release
This is because we must assume that everything else is stale.
There's a chance this can produce temporarily out-of-sync results:
- A license is deprecated between commits A and B
- `nixos-unstable-small` (B) evaluates before `nixos-unstable` (A)
- State of A will be shown
- Only when `nixos-unstable` (B) evaluates, state of B settles
This can only be fixed by observing commit order, but this is far out of scope for this change.
- Remove maintainers' GitHub handle uniqueness requirement
While since recently, any given Nixpkgs commit will have unique GitHub handles, this is not necessarily true across commits.
In particular this allows handling the special case where a maintainer changes GitHub IDs but recovers the handle:
- commit A: id X, handle Y
- commit B: id X, handle Z
- commit C: id W, handle Y
The change was primarily smoke-tested by running evaluations manually.
This means, we're essentially relying on correctness by self-consistency via types and the logic being simple.
It would be really good to have fine-grained tests of the desired behavior though (property testing would make most sense here).1 parent 1950cc2 commit bb602b4
3 files changed
Lines changed: 273 additions & 170 deletions
0 commit comments