Skip to content

Fix comm sort-order crash in package diffing; align minimal list with R 4.5 - #17

Merged
gaow merged 2 commits into
StatFunGen:mainfrom
jaempawi:main
Sep 3, 2026
Merged

gaow merged 2 commits into
StatFunGen:mainfrom
jaempawi:main

Conversation

@jaempawi

@jaempawi jaempawi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Two small fixes found while setting up a fresh macOS install.

1. pixi-setup.sh: comm: file 1 is not in sorted order

comm requires both inputs to be sorted. In inject_packages, the left-hand input is the output of pixi global list --json | jq | tr, which is never sorted:

comm -13 <(pixi global list --json --environment ${environment} | jq '...name' | tr -d '"') <(sort -u ${package_list})

This stays quiet on a first clean run, because the target env holds exactly one package at that point and a single line is trivially sorted. On any rerun into an env that already holds two or more packages, comm fails. With set -o errexit that kills the script outright, and since inject_packages r-base runs before inject_packages python, the Python section never executes at all.

Fix: sort the left-hand side, and pin LC_ALL=C on both sides of both comm calls so the two inputs cannot be collated differently on a machine with a non-C locale.

2. minimal_packages.txt: r-base 4.4 -> 4.5

The two lists disagreed: minimal pinned r-base=4.4 while full pins r-base=4.5. Anyone installed from the minimal list then cannot add r-pecotmr later, since every published build requires r-base >=4.5,<4.6.0a0:

r-pecotmr 0.7.7 | 0.7.8 would require
  r-base >=4.5,<4.6.0a0, for which no candidates were found

Bumping minimal to 4.5 makes the two lists agree and keeps the minimal env forward-compatible. Happy to drop this commit if the 4.4 pin was deliberate.

@gaow
gaow merged commit 57b4d63 into StatFunGen:main Sep 3, 2026
2 of 3 checks passed
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.

2 participants