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

Track dependencies with linkage in formulae #19205

Open
1 task done
nandahkrishna opened this issue Feb 3, 2025 · 1 comment
Open
1 task done

Track dependencies with linkage in formulae #19205

nandahkrishna opened this issue Feb 3, 2025 · 1 comment
Labels
features New features

Comments

@nandahkrishna
Copy link
Member

Verification

Provide a detailed description of the proposed feature

When new bottles are built for formulae, compare their linkage to dependencies versus the previous version's bottle. This information can then be autogenerated and stored in the bottle block or a new linkage block. This will allow us to drop dependencies that are no longer used, and be able to check/do this automatically, unlike now – we are unable to do this without maintainers/contributors checking this.

CC @Homebrew/core

What is the motivation for the feature?

Removing redundant dependencies means fewer dependencies are installed or old, unused dependencies are removed – reducing disk usage for users and keeping the dependency information in the formula file correct.

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

Yes, reducing users' disk space and ensuring formula files have correct dependency information are both important goals.

What alternatives to the feature have been considered?

Current status quo: do nothing different.

@nandahkrishna nandahkrishna added the features New features label Feb 3, 2025
@MikeMcQuaid
Copy link
Member

This is great, thanks @nandahkrishna! One nit:

When new bottles are built for formulae, compare their linkage to dependencies versus the previous version's bottle. This information can then be autogenerated and stored in the bottle block or a new linkage block. This will allow us to drop dependencies that are no longer used, and be able to check/do this automatically, unlike now – we are unable to do this without maintainers/contributors checking this.

I'm fairly 👎🏻 on storing this in the bottle or linkage block; it'll look pretty ugly. Some alternate options here:

  • store in the INSTALL_RECEIPT.json
  • store somewhere else in the bottle manifest (as it includes the INSTALL_RECEIPT.json)
  • require something like depends_on "foo" => :linkage which causes a failure if brew linkage detects that it's not linked to and causes brew linkage to fail if it detects any formulae with linkage that don't have :linkage

Any of these could be used by brew test-bot similarly for comparison purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features
Projects
None yet
Development

No branches or pull requests

2 participants