An npm install of chomp on an arm64 mac runs commands as if it were x86_64!
To replicate this on a Mac (with an Arm processor)...
- Install chomp via npm
- Create this chompfile.toml:
[[task]]
name = 'uname'
run = 'uname -sm'
- then run
chomp uname
you'll see:
Darwin x86_64 rather than the expected Darwin arm64
It seems like the release script needs to be updated to support this here https://github.com/guybedford/chomp/blob/main/.github/workflows/release.yml.
Specifically, adding a new:
- name: macos-arm64
os: macos-latest
artifact_name: chomp
asset_name: chomp-macos-arm64
asset_extension: .tar.gz
target: aarch64-apple-darwin
with step:
- name: Add target
if: matrix.target
run: rustup target add ${{ matrix.target }}
and build:
- name: Build
run: cargo build --release --locked ${{ matrix.target && format('--target {0}', matrix.target) || '' }}
and archive step:
- name: Archive release
shell: bash
run: |
if [ -n "${{ matrix.target }}" ]; then
cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "${{ matrix.artifact_name }}"
else
cp "target/release/${{ matrix.artifact_name }}" "${{ matrix.artifact_name }}"
fi
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a "${asset_name}" "${{ matrix.artifact_name }}"
else
tar czf "${asset_name}" "${{ matrix.artifact_name }}"
fi
This would need to be carefully tested with a new release cycle.
If you're feeling brave I can give you access to give it a go?
Thanks for this Guy, usually I would certainly be willing to test this, but I don't really have the time atm to dive into it, and I'm not sure what I'd do if it didn't work. I've been encouraging our team to use the pkgx install which doesn't have this problem, and ensures all other tooling is consistent. I'll be happy to revisit it once the chaos dies down (hahaha, as if that ever happens, but here's hoping).