Request for help: patch for icecream

hi: the icecream distributed compiler has a 100MB memory limit because the free memory detection logic is not implemented on macos.
while i’ve submitted a PR upstream ( i’m wondering how we can integrate the patch into homebrew?
the current 100MB memory limit can easily be reached with non-trivial c++ sources

Preferably it’d be integrated by upstream releasing the patch. In the meantime you can always apply the upstream patch in the formula.

well, it may take a little until the patch is (a) merged and (b) there’s a new upstream release. applying the patch in the formula would be the best solution, but i need some guidance on how to do that.

the formula in question is:

if someone can guide me through the process, i’m happy do submit a PR

Not sure what guidance you need but if you need a reference, here’s one:

@timblechmann: Let’s wait until upstream accepts the patch. Once that happens I can help you, or I may even do it on your behalf. I work with some folks who use icecream, and have a number of macOS machines under my control that I would love to be able to leverage to reduce compilation times.

@zbeekman i’m happy do to some grunt work, but it would be great if you can guide me through.

@timblechmann sure! In the interest of educating people to help them contribute please follow these steps:

  1. Examine to see how to properly specify a patch. Make sure you include a comment with:
    • An indication of when to remove the patch (next release since it was merged upstream)
    • Links to upstream PRs / issues
    • Indication if upstream merged PR or plans a fix in the next release
    • General (brief) description for the reason to apply the patch
  2. Get the patch raw url, download it, and compute the sha256 checksum for the patchdo block
  3. Add the patch do block to icecream.rb and add a formula revision.
  4. Install (from source) the new formula
  5. brew audit --strict icecream after installing. If there are failures try brew audit --strict --fix icecream or manually fix according to the output.
  6. brew test icecream locally
  7. Commit with commit message: icecream: patch for incorrect memory bug
  8. Push to your fork of homebrew-core and open a PR

Details should also be in, in particular the Formula Cookbook and the info about getting your PR merged.


Let’s continue any additional discussion over in your PR once it’s opened. (Feel free to link it here.)

thanks for the guidance!