fix: update Homebrew formula to use PyYAML 6.0.3 and automate versioning - #71
Closed
mdvanes wants to merge 1 commit into
Closed
fix: update Homebrew formula to use PyYAML 6.0.3 and automate versioning#71mdvanes wants to merge 1 commit into
mdvanes wants to merge 1 commit into
Conversation
Owner
|
I have recently update https://github.com/eschaar/homebrew-vstack/blob/main/.github/workflows/formula-update.yml. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I've been investigating a Homebrew install failure that affects anyone who tries brew tap eschaar/vstack && brew install vstack today. Here's the full picture and what needs to change on your end.
What's broken and why
brew install vstack currently fails with:
The root cause is in Formula/vstack.rb in this repo (eschaar/homebrew-vstack). The pyyaml resource block was committed with empty url and sha256 values:
Homebrew cannot install a resource with no URL, so the install fails immediately.
This happened because the automated dispatch from vstack/publish.yml was never enabled (HOMEBREW_TAP_ENABLED was "false"), so the formula was manually seeded but with placeholder values that were never filled in.
Fix 1 — immediate: patch Formula/vstack.rb (one manual commit to this repo)
Replace the pyyaml resource block with the correct PyYAML 6.0.3 values (latest stable, satisfies the >=6.0 constraint in vstack's pyproject.toml):
This is the only change needed to unblock installs today.
Fix 2 — structural: replace the formula-update.yml update step (one commit to this repo)
There's a second bug that will cause the same problem again on the next automated release. The current formula-update.yml uses sed patterns that match every url "..." and sha256 "..." line in the file — including the ones inside the pyyaml resource block. So every automated formula update overwrites the pyyaml values with the vstack sdist values.
Replace the update step with this Python-based approach, which is precise and safe:
The count=1 ensures only the first match (the top-level formula block) is touched, and the resource-scoped patterns update pyyaml independently without any risk of collision.
Summary of what you need to do
Step Repo Change
Fix broken install now eschaar/homebrew-vstack Update pyyaml resource block in Formula/vstack.rb (Fix 1)
Prevent recurrence eschaar/homebrew-vstack Replace sed update step in formula-update.yml (Fix 2)
Enable automation eschaar/vstack Merge the publish.yml PR and set HOMEBREW_TAP_ENABLED = "true"