Improve messaging for missing bubblewrap#22687
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves user-facing messaging when Bubblewrap (bwrap) is missing on Linux, making it clearer how to resolve Linux sandbox failures.
Changes:
- Expanded the exception text raised when
bubblewrap_executable!is requested but Bubblewrap is unavailable. - Enhanced the
failure_reasonfor the:missingsandbox state to include an installation suggestion.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "Bubblewrap is required to use the Linux sandbox. " \ | ||
| "Try installing it with `brew install bubblewrap`.", |
There was a problem hiding this comment.
Let's dry this up to avoid duplicating this naming.
brew install bubblewrap should never actually fix this. If it does, something in our logic is incorrect as we try to auto-install it.
We could tell people to e.g. apt-get install bubblewrap if our version doesn't work.
Can you verify this is after #22669 was merged into a release? If not, that may have fixed this.
There was a problem hiding this comment.
Seems that doesn't fix it Homebrew/discussions#6893 (comment)
There was a problem hiding this comment.
Thanks @SMillerDev. This seems to be a regression. Can you take a look @Bo98?
There was a problem hiding this comment.
Looks like it happens in both 6.0.0 and 6.0.1 so not a regression in 6.0.1. The issue also seems to be specific to --build-from-source.
It's almost certainly this:
brew/Library/Homebrew/extend/os/linux/diagnostic.rb
Lines 31 to 35 in bbba76f
That check runs before we automatically install it. Given we install it automatically, we don't need fatal_build_from_source_checks to check if it's installed.
Code Coverage OverviewLanguages: Ruby Ruby / code-coverage/simplecovThe overall coverage in the branch is 79%. The coverage in the branch is 78%. Show a code coverage summary of the most impacted files.
Updated |
Inspired by comments in https://github.com/orgs/Homebrew/discussions/6893
brew lgtm(style, typechecking and tests) with your changes locally?