Skip to content

Resolve dependencies according to bottle/tab when installing older bottles #19315

Open
@carlocab

Description

Verification

Provide a detailed description of the proposed feature

If installing an older bottle (e.g. a :sonoma bottle when running on macOS 15), brew should resolve dependencies according to the built bottle (perhaps by checking the tab) rather than what it thinks the dependencies on the current version of macOS that is being run.

We should continue to resolve dependencies as we currently do when installing bottles built for the current OS, because we still sometimes update a formula's dependencies without building new bottles when the change in dependencies has no effect on the built bottles (e.g. when a dependency was dropped a few versions ago but we only discovered this belatedly).

What is the motivation for the feature?

We are no longer bottling all formulae for Sequoia on Intel macOS. When macOS 16 is released, we are unlikely to provide bottles for all formulae for macOS 16 as well. This means that dependencies are not always resolved correctly when installing bottles built for older systems.

For example, [email protected] declares

uses_from_macos "expat", since: :sequoia

If you try to install the :sonoma bottle on Intel macOS Sequoia, you will encounter errors because the bottle relies on Homebrew expat but you won't have Homebrew expat installed (since brew thinks the macOS-provided expat suffices).

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

It probably won't be, but it will still be relevant to a significant fraction of Homebrew users who are running an Intel Mac.

What alternatives to the feature have been considered?

We could:

  • do nothing
  • bottle the affected formulae on new macOS versions
    Note that it's not always clear what the affected formulae are, so doing the second feels less sustainable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    featuresNew featureshelp wantedWe want help addressing this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions