Skip to content

Improve messaging for missing bubblewrap#22687

Open
SMillerDev wants to merge 1 commit into
mainfrom
chore/sandbox/linux_message
Open

Improve messaging for missing bubblewrap#22687
SMillerDev wants to merge 1 commit into
mainfrom
chore/sandbox/linux_message

Conversation

@SMillerDev

Copy link
Copy Markdown
Member

Inspired by comments in https://github.com/orgs/Homebrew/discussions/6893


  • 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? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

Copilot AI review requested due to automatic review settings June 12, 2026 07:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_reason for the :missing sandbox state to include an installation suggestion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +82 to +83
"Bubblewrap is required to use the Linux sandbox. " \
"Try installing it with `brew install bubblewrap`.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems that doesn't fix it Homebrew/discussions#6893 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @SMillerDev. This seems to be a regression. Can you take a look @Bo98?

@Bo98 Bo98 Jun 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:

def fatal_build_from_source_checks
(super + %w[
check_linux_sandbox
]).freeze
end

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Bo98 thanks good catch!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@github-code-quality

github-code-quality Bot commented Jun 12, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Ruby

Ruby / code-coverage/simplecov

The overall coverage in the branch is 79%. The coverage in the branch is 78%.

Show a code coverage summary of the most impacted files.
File c6a08de 97a0af1 +/-
search.rb 85% 75% -10%
resource.rb 91% 84% -7%
cmd/info.rb 77% 79% +2%
tap.rb 88% 91% +3%
services/cli.rb 62% 69% +7%
extend/pathname.rb 75% 82% +7%
cask/dsl/caveats.rb 85% 100% +15%
cask/auditor.rb 36% 100% +64%
extend/os/mac/api/internal.rb 0% 73% +73%
rubocops/unreferenced_let.rb 0% 100% +100%

Updated June 12, 2026 08:08 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants