Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew create --python fails on GitHub Actions + macos-15 #19043

Open
3 tasks done
gtaylor opened this issue Jan 6, 2025 · 3 comments
Open
3 tasks done

brew create --python fails on GitHub Actions + macos-15 #19043

gtaylor opened this issue Jan 6, 2025 · 3 comments
Labels
bug Reproducible Homebrew/brew bug help wanted We want help addressing this

Comments

@gtaylor
Copy link

gtaylor commented Jan 6, 2025

brew doctor output

==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL
==> $LOAD_PATHS
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.20/lib
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/gems/msgpack-1.7.3/lib
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.4/lib
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/extensions/arm64-darwin-20/3.3.0-static/msgpack-1.7.3
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/extensions/arm64-darwin-20/3.3.0-static/debug-1.9.2
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/gems/3.3.0/extensions/arm64-darwin-20/3.3.0-static/bootsnap-1.18.4
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/warning-1.5.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/vernier-1.5.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/vernier-1.5.0
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/tapioca-0.16.5/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/yard-sorbet-0.9.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/yard-0.9.37/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/stackprof-0.2.26/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/stackprof-0.2.26
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/spoom-1.5.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-static-and-runtime-0.5.11708/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-0.5.11708/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-static-0.5.11708-universal-darwin/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/simplecov_json_formatter-0.1.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.13.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-prof-1.7.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/ruby-prof-1.7.1
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-lsp-0.22.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-sorbet-0.8.7/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.3.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-performance-1.23.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-md-1.2.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.69.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-3.1.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/unicode-emoji-4.0.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-ast-1.37.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec_junit_formatter-0.6.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-sorbet-1.9.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-retry-0.6.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-github-2.4.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-3.13.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-expectations-3.13.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rspec-support-3.13.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/redcarpet-3.6.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/redcarpet-3.6.0
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rbs-3.8.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/rbs-3.8.1
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rbi-0.2.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rainbow-3.1.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/pry-0.15.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/prism-1.3.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/prism-1.3.0
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/plist-3.7.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/patchelf-1.5.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/parser-3.3.6.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/racc-1.8.1
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/parallel_tests-4.7.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/parallel-1.26.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/netrc-0.11.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/minitest-5.25.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/logger-1.6.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/kramdown-2.5.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rexml-3.4.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json_schemer-2.3.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/simpleidn-0.2.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.10.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.9.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/json-2.9.1
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/hana-1.3.7/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/erubi-1.13.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/elftools-1.3.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/diff-lcs-1.5.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/coderay-1.1.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/bindata-2.5.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/bigdecimal-3.1.9/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-20/3.3.0-static/bigdecimal-3.1.9
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/base64-0.2.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ast-2.4.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/addressable-2.8.7/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/public_suffix-6.0.1/lib
/opt/homebrew/Library/Homebrew
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/vendor_ruby/3.3.0
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/vendor_ruby/3.3.0/arm64-darwin20
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/vendor_ruby
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/arm64-darwin20
==> Homebrew Version
4.4.14
==> macOS
15.2
==> SIP
Disabled
==> Homebrew Cask Taps:
/opt/homebrew/Library/Taps/hashicorp/homebrew-tap (2 casks)
/opt/homebrew/Library/Taps/homebrew/homebrew-cask (7288 casks)
Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.4.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: f84082963da8af8c9ccd6dffbe932eba457e2b78
Last commit: 7 days ago
Branch: stable
Core tap JSON: 06 Jan 05:21 UTC
Core cask tap JSON: 06 Jan 05:21 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: ["--no-quarantine"]
HOMEBREW_COLOR: set
HOMEBREW_MAKE_JOBS: 3
HOMEBREW_NO_AUTO_UPDATE: set
HOMEBREW_NO_INSTALL_CLEANUP: set
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: 3-core 64-bit dunno
Clang: 16.0.0 build 1600
Git: 2.47.1 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.2-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: 16.0 => /Applications/Xcode_16.app/Contents/Developer
Rosetta 2: false

What were you trying to do (and why)?

Automatically regenerate the baymesh formula in my custom tap repo from CI using brew create --python. See: https://github.com/gtaylor/homebrew-baymesh

What happened (include all command output)?

The brew create command fails with a cryptic error and backtrace.

+./scripts/regen-python-formulas.sh:7> rm Formula/baymesh.rb
+./scripts/regen-python-formulas.sh:10> uv run --quiet scripts/get-latest-source-url.py
+./scripts/regen-python-formulas.sh:10> brew create --verbose --python https://files.pythonhosted.org/packages/e[7](https://github.com/gtaylor/homebrew-baymesh/actions/runs/12627259254/job/35181571897#step:9:8)/19/fad6f32d430ac1dc44d6cb49cd4245fdb51b840c338e092489463ba50635/baymesh-0.3.3.tar.gz --tap gtaylor/baymesh
Error: undefined method `chomp' for nil
/opt/homebrew/Library/Homebrew/dev-cmd/create.rb:236:in `__gets'
Formula name [baymesh]: 
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.1170[8](https://github.com/gtaylor/homebrew-baymesh/actions/runs/12627259254/job/35181571897#step:9:9)/lib/types/private/methods/call_validation.rb:278:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/call_validation.rb:278:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Homebrew/dev-cmd/create.rb:1[9](https://github.com/gtaylor/homebrew-baymesh/actions/runs/12627259254/job/35181571897#step:9:10)2:in `create_formula'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/call_validation.rb:278:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.[11](https://github.com/gtaylor/homebrew-baymesh/actions/runs/12627259254/job/35181571897#step:9:12)708/lib/types/private/methods/call_validation.rb:278:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Homebrew/dev-cmd/create.rb:74:in `run'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/call_validation.rb:278:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/call_validation.rb:278:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11708/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Homebrew/brew.rb:94:in `<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting
Error: Process completed with exit code 1.

What did you expect to happen?

I expected brew create to create a new formula from my Python app in the appropriate path.

Step-by-step reproduction instructions (by running brew commands)

1. Fork https://github.com/gtaylor/homebrew-baymesh
1. Manually trigger the "refresh Python Formulas" workflow. Change the `gtaylor` in this URL to your username and click the "Run workflow" button in the upper right corner: `https://github.com/gtaylor/homebrew-baymesh/actions/workflows/refresh_python.yml`
@gtaylor gtaylor added the bug Reproducible Homebrew/brew bug label Jan 6, 2025
@Bo98
Copy link
Member

Bo98 commented Jan 6, 2025

Indeed it is a bit cryptic. It's one of the few commands that takes interactive input. It does so for the name specifically, so you will need to pass --set-name=<name> in a CI environment. Everything else should work fine.

Though we should of course make that error properly rather than crash.

In the scenario you describe however, it sounds like you may find brew bump-formula-pr more useful than brew create. brew create in CI is very rare.

@gtaylor
Copy link
Author

gtaylor commented Jan 6, 2025

That did indeed do the trick. Thanks!

In the scenario you describe however, it sounds like you may find brew bump-formula-pr more useful than brew create. brew create in CI is very rare.

This sounds interesting! Will it automatically add and update the resource blocks for Python dependencies? I didn't want to have to go in and revise those manually with each release.

@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Jan 6, 2025
@Bo98
Copy link
Member

Bo98 commented Jan 6, 2025

Will it automatically add and update the resource blocks for Python dependencies?

Yes, it should do. We use that functionality regularly ourselves in homebrew-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug help wanted We want help addressing this
Projects
None yet
Development

No branches or pull requests

3 participants