Comments (8)
regardless (and not a blocker for fixing this 🐛) we should probably have something like this in future instead:
resource "homebrew-test-audio" => :test do
url "https://raw.githubusercontent.com/openai/whisper/7858aa9c08d98f75575035ecd6481f462d66ca27/tests/jfk.flac"
sha256 "63a4b1e4c1dc655ac70961ffbf518acd249df237e5a0152faae9a4a836949715"
end
from brew.
Maybe we should revert temporarily. This is causing several big PR testing to fail on homebrew-core.
from brew.
Test resources working is purely accidental tbh so am not surprised it breaks.
That's why the signature is "wrong" - it was never supposed to be used this way, someone figured out it worked and it slowly became widespread from there.
Long-term ambition is full support via :test
tag or similar but this hasn't been picked up yet.
from brew.
@fxcoudert Can you (or someone) try to git bisect
to figure out when this happened?
I'm not sure if the issue is that the test resource cannot be found or that brew fetch
is trying to fetch something found in a test do
block.
from brew.
I'm traveling so I can't debug properly for now, or bisect. But this happens only in the test step, all those steps before succeeded:
==> brew fetch --retry openai-whisper --build-bottle --force
==> brew install --verbose --build-bottle openai-whisper
==> brew style --formula openai-whisper
==> brew audit --formula openai-whisper --online --git --skip-style
==> brew bottle --verbose --json openai-whisper --only-json-tab
==> brew bottle --merge --write --no-commit --no-all-checks ./openai-whisper--20231117_3.arm64_sonoma.bottle.json
==> brew uninstall --force openai-whisper
==> brew uninstall --force asciidoc asciidoctor autoconf automake berkeley-db@5 bison boost cargo-c cmake curl docbook docbook-xsl doxygen flatbuffers gdbm gnu-getopt gobject-introspection googletest libgit2 libssh2 libtool lit llvm@17 lua m4 meson ncurses ninja openldap perl pkg-config protobuf@21 python-setuptools [email protected] rtmpdump ruby rust scons source-highlight sphinx-doc swig util-macros vim xcb-proto xmlto xtrans
==> brew install --only-dependencies ./openai-whisper--20231117_3.arm64_sonoma.bottle.tar.gz
==> brew install ./openai-whisper--20231117_3.arm64_sonoma.bottle.tar.gz
==> brew linkage --test openai-whisper
==> brew linkage --cached --test --strict openai-whisper
==> brew linkage --cached openai-whisper
==> brew install --only-dependencies --include-test openai-whisper
and only this one fails:
==> brew test --verbose openai-whisper
https://github.com/Homebrew/homebrew-core/actions/runs/8899611195/job/24497962540?pr=170392
I've been able to test locally that it happens with any formula. It's also not a download failure, it doesn't even initiate the download.
In case it helps, the full backtrace (where I added the same in my local gmp
formula for easier testing) is:
An exception occurred within a child process:
ResourceMissingError: gmp does not define resource "homebrew-test-audio"
/opt/homebrew/Library/Homebrew/software_spec.rb:136:in `block in resource'
/opt/homebrew/Library/Homebrew/software_spec.rb:136:in `fetch'
/opt/homebrew/Library/Homebrew/software_spec.rb:136:in `resource'
/opt/homebrew/Library/Homebrew/formula.rb:557:in `resource'
/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/g/gmp.rb:64:in `block in <class:Gmp>'
/opt/homebrew/Library/Homebrew/formula.rb:2793:in `block (3 levels) in run_test'
/opt/homebrew/Library/Homebrew/extend/kernel.rb:520:in `with_env'
/opt/homebrew/Library/Homebrew/formula.rb:2792:in `block (2 levels) in run_test'
/opt/homebrew/Library/Homebrew/formula.rb:1198:in `with_logging'
/opt/homebrew/Library/Homebrew/formula.rb:2791:in `block in run_test'
/opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run'
/opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir'
/opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run'
/opt/homebrew/Library/Homebrew/formula.rb:3102:in `mktemp'
/opt/homebrew/Library/Homebrew/formula.rb:2785:in `run_test'
/opt/homebrew/Library/Homebrew/test.rb:46:in `block in <main>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `block in catch'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:123:in `timeout'
/opt/homebrew/Library/Homebrew/test.rb:50:in `<main>'
from brew.
Done bisecting:
caf87c0336dea14bafe35441ea90dfd32be27d85 is the first bad commit
commit caf87c0336dea14bafe35441ea90dfd32be27d85
Author: Markus Reiter <[email protected]>
Date: Fri Apr 26 20:55:51 2024 +0200
Warn about undocumented non-private APIs.
from brew.
The problem is Formula.resource
works on class level, and I thought that Formula#resource
at the instance level is only used for accessing the class level resource definitions, hence only the name
argument is needed.
In openai-whisper
we are using Formula#resource
in test
to define a new resource with a block, so the signature is wrong.
from brew.
resource "homebrew-test-audio" => :test do
this is what is needed
from brew.
Related Issues (20)
- Add `test` tag support for `resource`s HOT 1
- docs.brew.sh/Manpage does not wrap text properly on mobile HOT 3
- `brew migrate` doesn't recognise migrations to API taps HOT 3
- Verbose option stopped working (`-v` shows version, `--verbose` unknown command) HOT 3
- Allow casks to opt-in to forcibly quit during `brew upgrade` HOT 9
- Imposible update using WIFI HOT 3
- don't write .keepme in `bin` and `sbin` if it isn't needed HOT 1
- brew update --greedy: Parameter 'message': Expected type String, got type OptionParser::InvalidOption with value #<OptionParser::InvalidOption: --greedy> HOT 1
- `HOMEBREW_GITHUB_API_TOKEN` doesn't apply for call to `https://api.github.com/repos/org/name/releases/latest` HOT 2
- Homebrew formula has linkage issue on Apple silicon setup for python application with selenium as dependency HOT 5
- Support user set BUNDLE_USER_CACHE HOT 14
- Consider getting superenv from `/etc/profile` and `/etc/environment` HOT 5
- SBOMs break bottle reproducibility HOT 18
- Improve caveats handling for API installs HOT 8
- Migration to other tap broken HOT 11
- Replace PAT usage with GitHub App Tokens HOT 1
- Use `main` for Homebrew branches HOT 4
- Use Sorbet `typed: strict` in all (non-package) files in Homebrew organisation
- Attestation failure message emits secret HOT 1
- Spurious linkage errors to GCC on Linux HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew.