Skip to content

formula_creator: add deny network for cabal and zig - #23739

Merged
MikeMcQuaid merged 2 commits into
mainfrom
formula_creator-cabal
Sep 2, 2026
Merged

formula_creator: add deny network for cabal and zig#23739
MikeMcQuaid merged 2 commits into
mainfrom
formula_creator-cabal

Conversation

@cho-m

@cho-m cho-m commented Sep 1, 2026

Copy link
Copy Markdown
Member

Continuing work on extending deny_network_access!.

For Cabal, using std_cabal_v2_args as that includes resolver arguments (e.g. backjumps) which are needed during fetch

For Zig, can default to plain --fetch (skip lazy deps) and switch to --fetch=all only when lazy deps are needed:

Also invert the list as shorter to list remaining modes. Still working on some issues with crystal (Homebrew/homebrew-core#301831) and zig (Homebrew/homebrew-core#301796) before we can update formulae.

Was also trying out Ruby bundle cache but working through some errors.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Copilot AI balanced review requested due to automatic review settings September 1, 2026 23:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Changes recommended

The inverted mode filter lacks regression coverage for all five excluded modes.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Extends generated Cabal formulae to separate dependency fetching from offline installation.

Changes:

  • Enables network denial for Cabal formulae.
  • Adds Cabal鈥檚 download-only fetch phase.
  • Simplifies mode filtering and updates tests.
File summaries
File Description
Library/Homebrew/formula_creator.rb Updates Cabal formula generation and network rules.
Library/Homebrew/test/formula_creator_spec.rb Tests generated Cabal fetch behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/formula_creator.rb Outdated
@cho-m cho-m changed the title formula_creator: add deny network for cabal formula_creator: add deny network for cabal and zig Sep 2, 2026

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, love these!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit f0c0505 Sep 2, 2026
60 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the formula_creator-cabal branch September 2, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants