16 Commits

Author SHA1 Message Date
Douglas Eichelberger
61985bc7f3 Use top-level OS instead 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
bb80f063dc Fix namespacing 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
27e951c408 Replace undef with prepended modules 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
70b072a7d0 Suppress sorbet type errors when using `undef' 2024-08-15 08:03:45 -07:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Issy Long
0e81efcccb
sorbet: Comment more files that can't be strict because of undef
- Found with
  `grep -rL "# typed: strict" Library/Homebrew | xargs grep -l "undef "`.
- This stops people from trying to bump them and
  getting an error that they can't fix because
  [it's a Sorbet limitation](https://sorbet.org/docs/error-reference#3008),
  wasting contributor time.
2024-08-09 18:23:00 +01:00
Douglas Eichelberger
ee0c967ce0 Port Homebrew::DevCmd::Bottle 2024-03-20 10:16:17 -07:00
Mike McQuaid
412852bd5f
Apply suggestions from code review
Co-authored-by: Markus Reiter <me@reitermark.us>
2024-02-19 14:05:12 +00:00
Douglas Eichelberger
d6b3f5031a
Enable and fix warnings 2024-02-19 13:57:27 +00:00
Mike McQuaid
71888db8ba
bottle: reproducibility fixes.
I noticed from
https://github.com/Homebrew/homebrew-core/actions/runs/5751070010 that
we're no longer creating reproducible bottles between macOS and Linux.

All macOS checksums have changed but Linux ones have not. The main
difference between the two platforms is the `gtar` version used so let's
always just use the formula on both platforms.

While we're here, clear up the ordering and comments a little on the
reproducible `tar` arguments so that it's easier to compare with the
reproducible builds archives documentation.
2023-08-04 10:02:44 +01:00
Samuel Lo
41aab1490a bottle: some tar flags is not supported on Mojave 2023-05-04 04:01:51 +08:00
Ruiyang Wu
73a1380055 dev-cmd/bottle: Refactor setup_tar_and_args! to extend/os 2023-04-11 11:00:47 -04:00
Mike McQuaid
30b2a546e5
Revert "move dev-cmd/bottle methods to extend/os" 2023-02-10 17:01:22 +00:00
hyuraku
853421e968 repair setup_tar_and_args! method 2023-02-07 23:45:09 +09:00
hyuraku
ade7118057 add new method: gnutar_args 2023-02-07 23:22:33 +09:00
hyuraku
ec1a1566bc separate setup_tar_and_args method 2023-02-07 23:22:33 +09:00