Fix packages with nix teams not showing up#1492
Fix packages with nix teams not showing up#1492RossComputerGuy wants to merge 1 commit intorepology:masterfrom
Conversation
|
Is there a limit on a number of members in a team? |
| pkg.add_maintainers(extract_nix_maintainers(meta['maintainers'])) | ||
|
|
||
| if 'teams' in meta: | ||
| if not isinstance(meta['teams'], list): |
There was a problem hiding this comment.
You don't need data format checks, it should just fail on unexpected data. So this may probably be simplified to
for team in meta.get('teams', []):
pkg.add_maintainers(extract_nix_maintainers(team['members']))
8ce808b to
a258aec
Compare
No. The members list for teams can be arbitrarily long. https://github.com/NixOS/nixpkgs/blob/master/maintainers/team-list.nix#L1-L29 |
We need a safeguard then to avoid N² for large teams maintaining lots of packages. Can either limit a list of maintainers from the team with e.g. 10, with a log if it's exceeded, or add a single maintainer derived from the team name instead. |
1bc89e8 to
25ee7ff
Compare
|
N.B. this change isn't needed anymore as |
|
Should we close this then? |
|
Yes, this patch isn't needed. |
NixOS/nixpkgs#394797 added a new
meta.teamsattribute to packages in nix, NixOS/nixpkgs#400458 switched everything to use it. Without this fix, packages which usemeta.teamsdo not show ownership on repology.