Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ echo "# BEGIN SECTION: install ${PROJECT_FORMULA} dependencies"
# Process the package dependencies
brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies ${HEAD_FLAG}
# the following is needed to install :build dependencies of a formula
brew install $(brew deps --1 --include-build ${PROJECT_FORMULA})
# filter out the rotary dependencies since they require --HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

I was going to ask about this but I saw that you had reverted a commit adding - -HEAD. With this change you're r filtering out rotary packages? Do they not need to be installed?

Copy link
Contributor Author

@scpeters scpeters Mar 3, 2026

Choose a reason for hiding this comment

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

the issue is that brew install --only-dependencies doesn't install :build dependencies like pybind11. My initial fix for this in #630 was to run brew install a second time and explicitly pass it all dependencies (including build dependencies).

The initial form of this PR in 4a08fbb removed the second brew install invocation and added --build-bottle to the brew install --only-dependencies call. I think this would work if we didn't have formulae using --HEAD, but it failed when I tested it:

https://build.osrfoundation.org/job/gz_utils-ci-pr_any-homebrew-arm64/21/console

15:41:28 + brew install gz-utils5 --only-dependencies --build-bottle --HEAD
...
15:41:30 ==> Installing gz-rotary-utils from osrf/simulation
15:41:30 Error: The following formula cannot be installed from bottle and must be
15:41:30 built from source.
15:41:30   gz-rotary-cmake

So that would have been a more elegant approach, but it explicitly doesn't work with --HEAD formulae. So my hacky alternative is to just exclude gz-rotary-* formulae from the second brew install call so that we don't have to pass --HEAD to that call

Let me know if I should include any of this in the script comments, since I apparently didn't explain it enough there

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. The part I was missing was that brew deps --1 include-build will include all dependencies including :build, not just the :build dependencies.

NON_ROTARY_BUILD_DEPS=$(brew deps --1 --include-build ${PROJECT_FORMULA} | grep -v gz-rotary-)
brew install ${NON_ROTARY_BUILD_DEPS}

# pytest is needed to run python tests with junit xml output
PIP_PACKAGES_NEEDED="${PIP_PACKAGES_NEEDED} pytest"
Expand Down