9 Commits

Author SHA1 Message Date
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Markus Reiter
7591175f93
Fix env_config generator. 2023-03-15 14:28:47 +01:00
Issy Long
703b9b4f4d
Update Library/Homebrew/sorbet/custom_generators/env_config.rb 2023-03-13 00:11:12 +00:00
Markus Reiter
66d2ab220a
Fix code style. 2023-03-13 00:57:21 +01:00
Issy Long
c6ff9b59c0
sorbet: Delete unused nilable? method; regenerate RBIs; fix errors 2023-03-12 22:44:31 +00:00
Issy Long
169ae0e155
Apply suggestions from code review
Co-authored-by: Markus Reiter <me@reitermark.us>
2023-03-12 17:32:21 +00:00
Issy Long
8862c33b62
sorbet: Autogenerate the RBI file for Homebrew::EnvConfig
- I'm not as happy with this as I was with my work on `utils/tty.rb`,
  it feels a lot hackier and prone to breaking - especially the
  `T.nilable` "detection".
- However, it generates an RBI file that passes `brew typecheck`, so we
  can clean up some `hidden-definitions` entries, getting further
  towards fully typed.
2023-03-11 02:13:30 +00:00
Issy Long
48802daf01
sorbet: Regenerate homegrown RBI files with brew typecheck --update
- I needed to add some more `require`s to the `tty.rb` generator script
  since it failed to recognise `env_config` and Sorbet's `T` setup if I
  ran it not via `brew ruby`, and I couldn't get `brew ruby` to work
  within `safe_system` in the `typecheck` dev-cmd.
2023-03-06 21:46:05 +00:00
Issy Long
1295904986
sorbet: Autogenerate the RBI file for utils/tty.rb
- Sort of. It's not via Parlour, because I read the docs and all it says
  about dynamically generating things is "of course it's better to do
  that", no examples. I tried my best, but Bo's work on `attr.rb` was
  mind-boggling.
- Instead, let's add a simple but functional generator script that I
  actually understand, as an alternative to maintaining these RBI files
  for dynamic methods manually, so that we can get rid of some use of
  `srb rbi hidden-definitions` since that's deprecated.
- TODO: Run this script as part of `brew typecheck --update` so it gets
  updated with all the other RBI files periodically.
- Follow up to PR 14651.
2023-03-06 21:46:04 +00:00