Merge pull request #206527 from ncfavier/tree-sitter-unionOfDisjoint
This commit is contained in:
commit
21f61857ae
1 changed files with 1 additions and 13 deletions
|
@ -375,19 +375,7 @@ let
|
|||
knownTreeSitterOrgGrammarRepos);
|
||||
|
||||
in
|
||||
mergeAttrsUnique otherGrammars treeSitterOrgaGrammars;
|
||||
|
||||
# TODO: move to lib
|
||||
mergeAttrsUnique = left: right:
|
||||
let intersect = lib.intersectLists (lib.attrNames left) (lib.attrNames right); in
|
||||
assert
|
||||
lib.assertMsg (intersect == [ ])
|
||||
(lib.concatStringsSep "\n" [
|
||||
"mergeAttrsUnique: keys in attrset overlapping:"
|
||||
"left: ${lib.generators.toPretty {} (lib.getAttrs intersect left)}"
|
||||
"right: ${lib.generators.toPretty {} (lib.getAttrs intersect right)}"
|
||||
]);
|
||||
left // right;
|
||||
lib.attrsets.unionOfDisjoint otherGrammars treeSitterOrgaGrammars;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue