Skip to content

deps: don't skip dependencies that are both :build and :test#6872

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
EricFromCanada:deps-build-test
Dec 28, 2019
Merged

deps: don't skip dependencies that are both :build and :test#6872
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
EricFromCanada:deps-build-test

Conversation

@EricFromCanada
Copy link
Copy Markdown
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Fix for brew deps including dependencies or requirements that are both :build and :test only if both --include-build and --include-test are specified, as only one should be necessary.

Before

$ brew deps --annotate sourcedocs --include-requirements --include-build --include-test
:xcode [build] [test]
$ brew deps --annotate sourcedocs --include-requirements --include-test
:xcode [build] [test]
$ brew deps --annotate sourcedocs --include-requirements --include-build
$ brew deps --annotate --tree sourcedocs --include-requirements --include-build --include-test
sourcedocs
└── :xcode [build] [test]

$ brew deps --annotate --tree sourcedocs --include-requirements --include-test
sourcedocs

$ brew deps --annotate --tree sourcedocs --include-requirements --include-build
sourcedocs

$ brew deps --annotate ibex --include-build --include-test
bison [build]
flex [build]
gettext
help2man [build]
pkg-config [build] [test]
$ brew deps --annotate ibex --include-test
pkg-config [build] [test]
$ brew deps --annotate ibex --include-build
bison [build]
flex [build]
gettext
help2man [build]
$ brew deps --annotate --tree ibex --include-build --include-test
ibex
├── bison [build]
├── flex [build]
│ ├── help2man [build]
│ └── gettext
└── pkg-config [build] [test]

$ brew deps --annotate --tree ibex --include-test
ibex

$ brew deps --annotate --tree ibex --include-build
ibex
├── bison [build]
└── flex [build]
├── help2man [build]
└── gettext

After

$ brew deps --annotate sourcedocs --include-requirements --include-build --include-test
:xcode [build] [test]
$ brew deps --annotate sourcedocs --include-requirements --include-test
:xcode [build] [test]
$ brew deps --annotate sourcedocs --include-requirements --include-build
:xcode [build] [test]
$ brew deps --annotate --tree sourcedocs --include-requirements --include-build --include-test
sourcedocs
└── :xcode [build] [test]

$ brew deps --annotate --tree sourcedocs --include-requirements --include-test
sourcedocs
└── :xcode [build] [test]

$ brew deps --annotate --tree sourcedocs --include-requirements --include-build
sourcedocs
└── :xcode [build] [test]

$ brew deps --annotate ibex --include-build --include-test
bison [build]
flex [build]
gettext
help2man [build]
pkg-config [build] [test]
$ brew deps --annotate ibex --include-test
pkg-config [build] [test]
$ brew deps --annotate ibex --include-build
bison [build]
flex [build]
gettext
help2man [build]
pkg-config [build] [test]
$ brew deps --annotate --tree ibex --include-build --include-test
ibex
├── bison [build]
├── flex [build]
│ ├── help2man [build]
│ └── gettext
└── pkg-config [build] [test]

$ brew deps --annotate --tree ibex --include-test
ibex
└── pkg-config [build] [test]

$ brew deps --annotate --tree ibex --include-build
ibex
├── bison [build]
├── flex [build]
│ ├── help2man [build]
│ └── gettext
└── pkg-config [build] [test]

plus a code readability improvement
Copy link
Copy Markdown
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.

Looks great, thanks for the fix @EricFromCanada!

@MikeMcQuaid MikeMcQuaid merged commit e7a2fde into Homebrew:master Dec 28, 2019
@EricFromCanada EricFromCanada deleted the deps-build-test branch December 28, 2019 15:03
@lock lock bot added the outdated PR was locked due to age label Jan 27, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants