Skip to content

formula_creator: add deny network for go and rust - #23734

Merged
cho-m merged 1 commit into
mainfrom
formula_creator-go-rust
Sep 1, 2026
Merged

formula_creator: add deny network for go and rust#23734
cho-m merged 1 commit into
mainfrom
formula_creator-go-rust

Conversation

@cho-m

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

Copy link
Copy Markdown
Member

Create Go and Rust-based formulae with deny_network_access!. These account for majority of newly added formulae.

These require a separate fetch step.

For Rust, it matches our existing documentation. Testing functionality in Homebrew/homebrew-core#300798

For Go, it uses go mod download to fetch into cache that we defined. Testing functionality in Homebrew/homebrew-core#301819


For remaining:

  • Still looking into Cabal and Zig which I think support separate fetch phase.
  • Python is complicated. May need to figure out how to handle PyPI build dependencies better.
  • Not sure yet on Crystal, Node and Ruby.

  • 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.

These require fetch step to download dependencies.
Copilot AI balanced review requested due to automatic review settings September 1, 2026 21:21

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.

Pull request overview

Adds offline Go and Rust formula templates using Homebrew’s separate dependency-fetch phase.

Changes:

  • Generates fetch methods for Go and Rust dependencies.
  • Denies build-time network access and enables Cargo offline installation.
  • Adds template-generation coverage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/formula_creator.rb Generates offline Go and Rust build templates.
Library/Homebrew/test/formula_creator_spec.rb Verifies generated fetch and network settings.

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

@cho-m
cho-m added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit c8e442d Sep 1, 2026
60 checks passed
@cho-m
cho-m deleted the formula_creator-go-rust branch September 1, 2026 23:24
@MikeMcQuaid

Copy link
Copy Markdown
Member

Thanks @cho-m!

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.

4 participants