Skip to content

Conversation

@itochan
Copy link
Contributor

@itochan itochan commented Aug 10, 2025

This PR improves the asset selection logic for macOS Apple Silicon (ARM64) systems to better handle asset names that contain "arm" (without "64" suffix) such as "dcm-macos-arm-release.zip".

I only modified macos_aarch64_re() and didn't change aarch64_re() because there's a risk of incorrectly selecting 32-bit binaries on non-macOS ARM64 environments.
Since all ARM environments on macOS are 64-bit, I believe this change will work correctly.

Note: I have contributed to this repository in the past. I allow edits to this branch and commits.

return Ok(matches.remove(0));
}

let filtered = self.maybe_filter_for_64_bit_arch(matches);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without changing the filter order, "arm" will be excluded because it doesn't contain the string "64".

@autarch
Copy link
Member

autarch commented Aug 16, 2025

Hi, thanks for your PR!

I'm pretty finicky about my projects (see this blog post for details), so I rarely merge a PR as-is.

For larger PRs, I typically use the GitHub PR review process and provide feedback directly on the code, asking you to make some changes. For smaller PRs, where I just want to tweak some small stuff (like doc wording, comments, code formatting, etc.), I don't do a PR review.

Whether or not I do a review, there are two options for merging the PR:

  1. I check your PR out locally, fiddle with it as needed, merge it locally, and simply close the PR on GitHub. This will preserve at least one commit with your name on it, but the PR will show up as closed in your GitHub stats.
  2. If you enable me to push directly to your PR branch (which is the default when you make a PR), I can do my fiddling, then force push to your PR branch and merge the resulting PR. Again, this will preserve at least one commit with your name on it, but you also get credit for the PR merge in your GitHub stats. The only downside is that I will be force pushing directly to your PR branch. Note that this will not work if the PR branch is named master. GitHub doesn't allow me to push to the default branch of your fork.

Please let me know which approach you'd prefer. If I don't hear from you before I get around to working on this PR I'll go with option 1.

Thanks again for your contribution!

@itochan
Copy link
Contributor Author

itochan commented Aug 16, 2025

I'd prefer option 2. Thank you.

…x86-64"

Previously, we would pick the x86-64 artifact because we looked for 64-bit names, but on macOS ARM
we should prefer plain "arm" over "x86-64".
@autarch autarch force-pushed the improve-matching-for-macos-aarch64 branch from ccdb32f to dd0fd09 Compare August 23, 2025 16:12
Copy link
Member

@autarch autarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few tweaks and I will merge it once CI passes.

@autarch autarch merged commit 3487797 into houseabsolute:master Aug 23, 2025
31 checks passed
@autarch
Copy link
Member

autarch commented Aug 23, 2025

Thanks for this! It'll be in the next release.

prashantv added a commit to prashantv/ubi that referenced this pull request Oct 9, 2025
Fixes houseabsolute#137

The picker logic for macos arm was reordered in houseabsolute#132
to return on a match, but this was done before checking
against the `--matching` filter.

Move up the check against `--matching` so it's not ignored.
prashantv added a commit to prashantv/ubi that referenced this pull request Oct 9, 2025
Fixes houseabsolute#137

The picker logic for macos arm was reordered in houseabsolute#132
to return on a match, but this was done before checking
against the `--matching` filter.

Instead, filter matches against `--matching` before
architecture matching.
autarch pushed a commit to prashantv/ubi that referenced this pull request Oct 11, 2025
The picker logic for macos arm was reordered in houseabsolute#132 to return on a match, but this was done before
checking against the `--matching` filter.

This fixes the picker code so that it filters assets against `--matching` before architecture
matching.
autarch pushed a commit to prashantv/ubi that referenced this pull request Oct 11, 2025
The picker logic for macos arm was reordered in houseabsolute#132 to return on a match, but this was done before
checking against the `--matching` filter.

This fixes the picker code so that it filters assets against `--matching` before architecture
matching.
autarch pushed a commit that referenced this pull request Oct 11, 2025
The picker logic for macos arm was reordered in #132 to return on a match, but this was done before
checking against the `--matching` filter.

This fixes the picker code so that it filters assets against `--matching` before architecture
matching.
@itochan itochan deleted the improve-matching-for-macos-aarch64 branch October 16, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants