Skip to content

Commit 6a22b44

Browse files
jfrocheyvan-sraka
authored andcommitted
chore: fix package meta maintainers format
1 parent e93a270 commit 6a22b44

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

nix/docs/adding-new-package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
3737
meta = with lib; {
3838
description = "Open-source vector similarity search for Postgres";
3939
homepage = "https://github.com/${src.owner}/${src.repo}";
40-
maintainers = with maintainers; [ olirice ];
40+
maintainers = [ "olirice" ];
4141
platforms = postgresql.meta.platforms;
4242
license = licenses.postgresql;
4343
};

nix/ext/pgvector.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let
6969
meta = with lib; {
7070
description = "Open-source vector similarity search for Postgres";
7171
homepage = "https://github.com/${src.owner}/${src.repo}";
72-
maintainers = with maintainers; [ olirice ];
72+
maintainers = [ "olirice" ];
7373
platforms = postgresql.meta.platforms;
7474
license = licenses.postgresql;
7575
};

scripts/github-matrix.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class NixEvalJobsOutput(TypedDict):
3333
neededBuilds: NotRequired[List[Any]]
3434
neededSubstitutes: NotRequired[List[Any]]
3535
outputs: NotRequired[Dict[str, str]]
36+
error: NotRequired[str]
3637

3738

3839
class RunsOnConfig(TypedDict):
@@ -96,6 +97,10 @@ def parse_nix_eval_line(line: str, drv_paths: Set[str]) -> Optional[NixEvalJobsO
9697

9798
try:
9899
data: NixEvalJobsOutput = json.loads(line)
100+
if "error" in data:
101+
raise ValueError(
102+
f"Error in nix-eval-jobs output for {data['attr']}: {data['error']}"
103+
)
99104
if data["drvPath"] in drv_paths:
100105
return None
101106
drv_paths.add(data["drvPath"])
@@ -149,14 +154,10 @@ def sort_pkgs_by_closures(jobs: List[NixEvalJobsOutput]) -> List[NixEvalJobsOutp
149154

150155
sorter = graphlib.TopologicalSorter(job_closures)
151156

157+
job_by_drv = {job["drvPath"]: job for job in jobs}
152158
for item in sorter.static_order():
153-
i = 0
154-
while i < len(jobs):
155-
if item == jobs[i]["drvPath"]:
156-
sorted_jobs.append(jobs[i])
157-
del jobs[i]
158-
else:
159-
i += 1
159+
if item in job_by_drv:
160+
sorted_jobs.append(job_by_drv[item])
160161

161162
return sorted_jobs
162163

0 commit comments

Comments
 (0)