There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
ClosesHomebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>
When a PR is merged during the test, the commit tree will be looked like
this:
master PR
\ /
\ /
|
root
The start_revision will be poined to the commit used to merging PR,
instead of common root commit. As result, `git diff-tree start end`
will list file changes both in PR and master branch, which later
contributes to additional formulae are tested in some Travis builds.
To fix the problem, we use `git merge-base` to get common ancestor as
the real start_revision.
ClosesHomebrew/homebrew#44379.
Signed-off-by: Xu Cheng <xucheng@me.com>
IO#gets will only return for every new lines, which will be bad for
`brew install` since we print dots in single line.
ClosesHomebrew/homebrew#44264.
Signed-off-by: Xu Cheng <xucheng@me.com>
* Only use first two word in command to keep id short
* Append unique number in the id.
ClosesHomebrew/homebrew#44104.
Signed-off-by: Xu Cheng <xucheng@me.com>
Fixes test-bot mishandling of optional cross-tap dependencies. Without
this change, since formula.stable.deps includes the optional dependencies but
formula.recursive_dependencies does not, test-bot was trying to select a
compiler for an untapped formula, which raised an error.
Our suspect handling of optional dependencies was exposed by Homebrew/homebrew#43145 /
7184348e822d6745d8a103de104ff9626536bf1e.
ClosesHomebrew/homebrew#43237.
Revert: "test-bot: ensure from-source initial installation"
This reverts commit a33c5b9121e66aa650d9d0fc5814202bd26154d0.
You know when your fix ends up causing another problem that you then have to
go fix as well? Yup...