We have no commands with Sorbet disabled and have had Sorbet enabled
for developers for a decent amount of time. As a result, we can enable
it for everyone who has run a developer command.
This also allows a bunch of `raise TypeError`s to be removed in favour
of relying on Sorbet here instead.
Right now this is done through the gcc@5 formula.
See 9692318ca6/Formula/gcc%405.rb (L33)
This is fragile because when we will migrate to gcc@11
we have to think about migrating the installation from one gcc formula to another..
Also, not having the right glibc version results in a non-functional brew
installation on an older Linux: the glibc installation needs
to be done by brew, and not by a workaround in a specific formula
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Co-Authored-By: Bo Anderson <mail@boanderson.me>
Co-Authored-By: Shaun Jackman <sjackman@gmail.com>
There are formulae that use resource blocks for stuff that is needed in
test blocks. If a resource is a `.zip` archive, one needs `unzip`
utility in `PATH` to extract it, but its only available at build-time,
so one observes an error like that for example:
```
==> brew test psftools --verbose
Testing psftools
==> Downloading https://www.zone38.net/font/pc8x8.zip
Already downloaded: /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip
==> Verifying ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip checksum
unzip -o /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip -d /tmp/d20200304-21389-ui0wr0
Error: psftools: failed
undefined method `shelljoin' for nil:NilClass
```
Of course this issue affects Linux the most, because of higher
probability that the system lacks `unzip` for example.
With this commit, all resource guessed dependencies should be available
at build and test time.
On some systems identified as Linux, zip and bzip2 might
not be available. Therefore, on such platforms we add them
unconditionally as dependencies when required. On Mac, these
dependencies are always satisfied.