-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
cmd/aspell-dictionaries: fix typecheck failure #204347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I did a quick search and it looks like this is the only use of a Utils::Curl
method in homebrew/core.
How this command handles parsing seems a bit fragile (it may break if the HTML slightly changes). One moment and I'll see if I can improve this (without using Edit: I ended up with one |
that works for me 👍 |
We recently upgraded `utils/curl` to `typed: strict`, which required us to rework how we handle the return type from some curl methods. I overlooked tap commands, so this fixes a related Sorbet error. Co-authored-by: Rui Chen <[email protected]>
I spent more time on this than necessary but I reworked the language-finding logic to use a regex, extracting the This minimizes our reliance on an overly-specific HTML structure and it uses case-insensitive matching, so it will continue to work if the capitalization of HTML tags/attributes changes or the table cell order changes. We can technically match within The new approach can still fail if the file type changes to something other than a tarball or if the path changes in a way that the regex won't match (or handle correctly). It's not perfect but this approach may be less brittle than the existing logic. Besides that, I made some changes to If you're good with this approach, feel free to pull the commits from my branch or I can push them here. The first commit covers minimal changes that are necessary here for |
yeah, I would just think we should get the CI unblocked first and then do a followup PR on the rework, what do you think? |
The rework may need some review, so that makes sense to me 👍 |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?seeing some typecheck failure as
relates to Homebrew/brew#19077