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

formulae_dependents: build more dependents from source #718

Merged
merged 2 commits into from
Nov 24, 2021

Conversation

carlocab
Copy link
Member

If the --build-dependents-from-source flag is passed, then all
dependents are built from source. This is the current behaviour.

We change behaviour in two ways:

  1. Build unbottled dependents from source if all its dependencies are
    either bottled, or were built earlier in the test-bot run.
  2. Build Linux-only formulae from source too (either with the
    appropriate flag or when the above condition is true) instead of
    always skipping source builds on Linux.

Building unbottled dependents will be useful for detecting dependents
which should be bottled after #714.

This change should also allow us to clean up a bit of code in the
#dependent_formulae! method. I've omitted that for now since I have a
pending PR (#717) which introduces conflicting changes.

@carlocab
Copy link
Member Author

If this change makes sense then I'll probably wait until #717 has been tested for a bit before merging this.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

If the `--build-dependents-from-source` flag is passed, then all
dependents are built from source. This is the current behaviour.

We change behaviour in two ways:
1. Build unbottled dependents from source if all its dependencies are
   either bottled, or were built earlier in the `test-bot` run.
2. Build Linux-only formulae from source too (either with the
   appropriate flag or when the above condition is true) instead of
   always skipping source builds on Linux.

Building unbottled dependents will be useful for detecting dependents
which should be bottled after Homebrew#714.

This change should also allow us to clean up a bit of code in the
`#dependent_formulae!` method. I've omitted that for now since I have a
pending PR (Homebrew#717) which introduces conflicting changes.
On macOS, all formulae are possible `source_dependents`. On Linux, only
Linux-only formulae are possible `source_dependents`.

From the formulae satisfying the above criteria, we insert only the ones
with useable dependencies into the `source_dependents` array. If the
`--build-dependents-from-source` flag is passed, then all such
dependents are placed into the `source_dependents` array. Otherwise, we
select only the ones that are not bottled on the current OS.
@carlocab carlocab force-pushed the more-source-dependents branch from cd28dee to c26b3d0 Compare November 18, 2021 15:36
@carlocab carlocab merged commit 9b5f583 into Homebrew:master Nov 24, 2021
@carlocab carlocab deleted the more-source-dependents branch November 24, 2021 14:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants