Skip to content

bug: resolve-go-packages.sh tests fail on macOS (BSD paste incompatibility) #403

Description

@sonupreetam

Summary

Three tests in tests/test_crapload_package_resolution.py fail on macOS but pass in CI (ubuntu-latest):

  • test_multi_module_repo
  • test_go_workspace
  • test_malformed_go_mod

Root Cause

scripts/resolve-go-packages.sh uses paste -sd ' ' to join multi-module package patterns. BSD paste (macOS) has different flag semantics than GNU paste (Linux), causing the command to fail with:

usage: paste [-s] [-d delimiters] file ...

Reproduction

make test

On macOS, the 3 tests fail with returncode=1 and stderr showing the paste usage error. On Linux (CI), all tests pass.

Impact

Local-only. CI is unaffected since it runs on ubuntu-latest with GNU coreutils. Developers running make test on macOS see 3 spurious failures.

Suggested Fix

Replace the paste usage in resolve-go-packages.sh with a portable alternative (e.g., tr, awk, or bash parameter expansion) that works on both BSD and GNU systems.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Fields

Priority

Low

Effort

None yet

Projects

Status
In progress 📋

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions