brew icon indicating copy to clipboard operation
brew copied to clipboard

Improve handling of arch-specific dependencies

Open Bo98 opened this issue 3 years ago • 1 comments

Provide a detailed description of the proposed feature

For OS-specific dependencies we have on_macos and on_linux (and uses_from_macos ...[, since: ...]). This allows brew audit and brew unbottled to still pick the correct dependency graph even if you are not on that system.

We have no such feature for arch-specific dependencies, which is unfortunately something I'm starting to see used more often.

When implementing this feature, there might be new audit failures to fix first that have previously been missed.

What is the motivation for the feature?

To allow brew audit and brew unbottled to work correctly when you are on the opposite system than the CPU conditional.

Notably our CI only runs audit checks on x86_64 and we ideally never should need to run audit checks on multiple host platforms - just simulate the various target platforms on the same host.

How will the feature be relevant to at least 90% of Homebrew users?

Less issues caused by various things audits catch such as version mismatches.

More correct output on formulae.brew.sh.

What alternatives to the feature have been considered?

Hacking Hardware::CPU.

Bo98 avatar Apr 08 '22 15:04 Bo98

👍🏻 this is a good idea, we should do this.

To me the goal is having formula.brew.sh be able to be correctly generated for all OSs/archs from any OS/arch.

MikeMcQuaid avatar Apr 11 '22 11:04 MikeMcQuaid

@Rylan12 @Bo98 was this completed?

MikeMcQuaid avatar Feb 16 '23 14:02 MikeMcQuaid

I think so! TBH I don't think I've ever looked at this issue before but it seems like it was done for the API stuff 😅

I think this can be closed and individual issues can be opened for things like displaying the information on formulae.brew.sh or changing audit/unbottled if they haven't been done yet

Rylan12 avatar Feb 16 '23 17:02 Rylan12

Yes, this was way back when on_intel/arm didn't exist so this was fixed by #13451.

For stuff like audits, I haven't checked but I probably should.

Bo98 avatar Feb 16 '23 17:02 Bo98