Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64/aarch64 binaries don't get prioritized over x86 #33

Closed
filiptibell opened this issue Sep 13, 2022 · 2 comments · Fixed by #34
Closed

Arm64/aarch64 binaries don't get prioritized over x86 #33

filiptibell opened this issue Sep 13, 2022 · 2 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@filiptibell
Copy link
Contributor

Just noticed that aftman chose the wrong binary when installing one of our internal tools:

CleanShot 2022-09-13 at 18 29 28@2x

In the screenshot you can see that the files downloaded are definitely x86 while the architecture I'm using is arm.
If I delete the x86_64 binary from the release aftman correctly picks the aarch64 one.

I'm thinking something might be going wrong during artifact selection / ordering

@LPGhatguy
Copy link
Owner

LPGhatguy commented Sep 13, 2022

I think we're relying on the Ord implementation of Architecture for this. The hope is that on systems that support AArch64 AND x86-64, we should pick AArch64. The opposite might be happening?

This is obviously not a great way solution as it makes this code very hard to debug.

At some point we should pull this code out so we can write better tests for it.

@LPGhatguy LPGhatguy added the bug Something isn't working label Sep 13, 2022
@filiptibell
Copy link
Contributor Author

I think we're relying on the Ord implementation of Architecture for this. The hope is that on systems that support AArch64 AND x86-64, we should pick AArch64. The opposite might be happening?

Did some diagnosing of this issue and when running locally it actually picked up the correct artifacts, the issue seems to be a missing --target flag during the release build. Basically, std::env::consts::ARCH was set to x86_64 even for aarch64 builds since that's what github's hosted runner is using, and rosetta magic made aftman still work for macOS. I'll make a quick PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants