fix(script): keep llvm-cov/profdata/symbolizer/scan-deps in generated formulae#8
Merged
Merged
Conversation
… formulae The update-formula generator only knew about clang-format, clang-tidy, clang-query, clang-apply-replacements and clang-include-cleaner. The llvm-cov, llvm-profdata, llvm-symbolizer and clang-scan-deps tools were added to the formulae by hand, so every automated regeneration dropped them again from the bundle formulae (see the auto-update PR that removed 230 lines). Teach the generator about all four extra tools so they are emitted as bundle resources (arm + intel), included in the install list, the `desc` and the test block, and generated as individual formulae — matching the current hand-maintained Formula/*.rb exactly. Regenerating now reproduces main instead of deleting tools. Also align the README with the other cpp-linter repos: add the shared "cpp-linter hub" badge plus Test Formulae / Update Formula CI badges in a centered header.
…rsion Collapse TOOLS_ALL / TOOLS_IC / TOOLS_EXTRA and the parallel INDIVIDUAL_TOOLS dict into one ordered TOOLS list. Version availability (clang-include-cleaner is LLVM 18+) is now a per-tool `min_version` attribute instead of a separate list, and the individual-formula class names are derived from the tool name (Homebrew's own convention) rather than duplicated. Behaviour is unchanged: the smoke-test set is now defined as "tools with no min_version" (always present on every version), which reproduces the existing test blocks, and generating against the current release still yields no diff against the hand-maintained Formula/*.rb.
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.
Problem
scripts/update-formula.pyonly knew about five tools —clang-format,clang-tidy,clang-query,clang-apply-replacements, andclang-include-cleaner. Thellvm-cov,llvm-profdata,llvm-symbolizer, andclang-scan-depstools were added to theFormula/*.rbfiles by hand and were never taught to the generator.As a result, every automated regeneration drops those four tools from the bundle formulae — exactly what the automated PR #7 did (
+10 / -230, stripping all four tools fromclang-tools.rbandclang-tools@{18,19,20,21}.rb). PR #7 is destructive and is being closed in favor of this fix;mainalready carries the correct release with all nine tools.Fix
Teach the generator about the four extra tools so a regeneration reproduces the current hand-maintained formulae exactly instead of deleting tools:
TOOLS_EXTRA = ["llvm-cov", "llvm-profdata", "llvm-symbolizer", "clang-scan-deps"]list, fetched into the checksum map for every version.resourceblocks (ARM + Intel), in the same order as the existing files, via a sharedbundle_resource_tools()helper.desc, the%w[...]install list, and thetest dosmoke checks.INDIVIDUAL_TOOLSentries (LlvmCov,LlvmProfdata,LlvmSymbolizer,ClangScanDeps) so their individualFormula/*.rbare regenerated and kept in sync too (previously they would silently go stale after an update).The ARM/Intel bodies were also de-duplicated into a single loop since they only differ by platform.
README
Aligns the tap with the other cpp-linter repos: adds the shared cpp-linter hub badge plus Test Formulae / Update Formula CI badges in a centered header. Tool content is unchanged.
Verification
2026.07.02-e6fa8f6a) should produce no diff againstmain(the script now matches the hand-maintained files). TheTest FormulaeCI installs andbrew tests the bundle plus all four extra tools on Intel + Apple Silicon.Notes / follow-up
This repo has no
LICENSE(sibling repos do — e.g. asdf, docker). I left it out of this PR since the license choice is yours to make; happy to add one in a follow-up once you confirm which (the org profile uses MIT).Generated by Claude Code