-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Sorbet typed: strict
in all (non-package) files in Homebrew organisation
#17297
Comments
Running diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb
index d87e54bfb2..cc03f66ffd 100644
--- a/Library/Homebrew/dev-cmd/typecheck.rb
+++ b/Library/Homebrew/dev-cmd/typecheck.rb
@@ -61,9 +61,9 @@ module Homebrew
ohai "Checking if we can bump Sorbet `typed` sigils..."
# --sorbet needed because of https://github.com/Shopify/spoom/issues/488
safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "false", "--to", "true",
- "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
+ "-f", "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "true", "--to", "strict",
- "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
+ "-f", "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
end
return (where ==> Checking if we can bump Sorbet `typed` sigils...
Checking files...
No files to bump from false to true
Checking files...
Can bump 383 files from true to strict:
+ PATH.rb
+ api.rb
+ api/analytics.rb
+ api/cask.rb
+ api/download.rb
+ api/formula.rb
+ build.rb
+ build_environment.rb
+ build_options.rb
+ bundle_version.rb
+ cache_store.rb
+ cask/artifact/abstract_artifact.rb
+ cask/artifact/abstract_flight_block.rb
+ cask/artifact/abstract_uninstall.rb
+ cask/artifact/binary.rb
+ cask/artifact/installer.rb
+ cask/artifact/keyboard_layout.rb
+ cask/artifact/manpage.rb
+ cask/artifact/mdimporter.rb
+ cask/artifact/moved.rb
+ cask/artifact/pkg.rb
+ cask/artifact/qlplugin.rb
+ cask/artifact/relocated.rb
+ cask/artifact/stage_only.rb
+ cask/artifact/symlinked.rb
+ cask/artifact/uninstall.rb
+ cask/artifact/zap.rb
+ cask/artifact_set.rb
+ cask/audit.rb
+ cask/auditor.rb
+ cask/cask.rb
+ cask/cask_loader.rb
+ cask/caskroom.rb
+ cask/config.rb
+ cask/download.rb
+ cask/dsl.rb
+ cask/dsl/base.rb
+ cask/dsl/caveats.rb
+ cask/dsl/conflicts_with.rb
+ cask/dsl/container.rb
+ cask/dsl/depends_on.rb
+ cask/dsl/version.rb
+ cask/exceptions.rb
+ cask/info.rb
+ cask/installer.rb
+ cask/list.rb
+ cask/macos.rb
+ cask/metadata.rb
+ cask/migrator.rb
+ cask/pkg.rb
+ cask/quarantine.rb
+ cask/reinstall.rb
+ cask/staged.rb
+ cask/uninstall.rb
+ cask/url.rb
+ cask/utils.rb
+ cask_dependent.rb
+ caveats.rb
+ cleaner.rb
+ cleanup.rb
+ cli/args.rb
+ cli/named_args.rb
+ cmd/--prefix.rb
+ cmd/deps.rb
+ cmd/fetch.rb
+ cmd/gist-logs.rb
+ cmd/home.rb
+ cmd/info.rb
+ cmd/leaves.rb
+ cmd/link.rb
+ cmd/list.rb
+ cmd/options.rb
+ cmd/outdated.rb
+ cmd/search.rb
+ cmd/tap-info.rb
+ cmd/update-report.rb
+ cmd/uses.rb
+ commands.rb
+ compilers.rb
+ completions.rb
+ context.rb
+ cxxstdlib.rb
+ debrew.rb
+ debrew/irb.rb
+ dependable.rb
+ dependencies.rb
+ dependencies_helpers.rb
+ dependency.rb
+ dependency_collector.rb
+ deprecate_disable.rb
+ description_cache_store.rb
+ descriptions.rb
+ dev-cmd/audit.rb
+ dev-cmd/bottle.rb
+ dev-cmd/bump-formula-pr.rb
+ dev-cmd/contributions.rb
+ dev-cmd/extract.rb
+ dev-cmd/generate-cask-api.rb
+ dev-cmd/generate-formula-api.rb
+ dev-cmd/irb.rb
+ dev-cmd/livecheck.rb
+ dev-cmd/pr-pull.rb
+ dev-cmd/pr-upload.rb
+ dev-cmd/tap-new.rb
+ dev-cmd/test.rb
+ dev-cmd/tests.rb
+ dev-cmd/unbottled.rb
+ dev-cmd/update-sponsors.rb
+ development_tools.rb
+ diagnostic.rb
+ download_strategy.rb
+ downloadable.rb
+ env_config.rb
+ exceptions.rb
+ extend/ENV/shared.rb
+ extend/ENV/super.rb
+ extend/api_hashable.rb
+ extend/io.rb
+ extend/kernel.rb
+ extend/on_system.rb
+ extend/os/linux/cleanup.rb
+ extend/os/linux/cmd/update-report.rb
+ extend/os/linux/dependency_collector.rb
+ extend/os/linux/development_tools.rb
+ extend/os/linux/diagnostic.rb
+ extend/os/linux/extend/ENV/shared.rb
+ extend/os/linux/extend/ENV/std.rb
+ extend/os/linux/extend/ENV/super.rb
+ extend/os/linux/formula.rb
+ extend/os/linux/formula_installer.rb
+ extend/os/linux/hardware/cpu.rb
+ extend/os/linux/install.rb
+ extend/os/linux/keg.rb
+ extend/os/linux/keg_relocate.rb
+ extend/os/linux/linkage_checker.rb
+ extend/os/linux/parser.rb
+ extend/os/linux/simulate_system.rb
+ extend/os/linux/system_config.rb
+ extend/os/mac/cleaner.rb
+ extend/os/mac/cleanup.rb
+ extend/os/mac/dependency_collector.rb
+ extend/os/mac/dev-cmd/bottle.rb
+ extend/os/mac/development_tools.rb
+ extend/os/mac/diagnostic.rb
+ extend/os/mac/extend/ENV/std.rb
+ extend/os/mac/extend/ENV/super.rb
+ extend/os/mac/formula.rb
+ extend/os/mac/formula_installer.rb
+ extend/os/mac/hardware/cpu.rb
+ extend/os/mac/keg.rb
+ extend/os/mac/keg_relocate.rb
+ extend/os/mac/linkage_checker.rb
+ extend/os/mac/readall.rb
+ extend/os/mac/simulate_system.rb
+ extend/os/mac/system_config.rb
+ extend/os/mac/utils/bottles.rb
+ extend/pathname.rb
+ formula.rb
+ formula_assertions.rb
+ formula_auditor.rb
+ formula_cellar_checks.rb
+ formula_creator.rb
+ formula_info.rb
+ formula_installer.rb
+ formula_pin.rb
+ formula_support.rb
+ formula_versions.rb
+ formulary.rb
+ github_packages.rb
+ global.rb
+ hardware.rb
+ help.rb
+ ignorable.rb
+ install.rb
+ install_renamed.rb
+ installed_dependents.rb
+ keg.rb
+ keg_relocate.rb
+ lazy_object.rb
+ linkage_cache_store.rb
+ linkage_checker.rb
+ linuxbrew-core-migration.rb
+ livecheck.rb
+ livecheck/skip_conditions.rb
+ livecheck/strategy.rb
+ livecheck/strategy/crate.rb
+ livecheck/strategy/github_releases.rb
+ livecheck/strategy/header_match.rb
+ livecheck/strategy/sparkle.rb
+ livecheck/strategy/xorg.rb
+ locale.rb
+ lock_file.rb
+ macos_version.rb
+ manpages.rb
+ manpages/converter/kramdown.rb
+ manpages/converter/roff.rb
+ manpages/parser/ronn.rb
+ metafiles.rb
+ migrator.rb
+ missing_formula.rb
+ mktemp.rb
+ official_taps.rb
+ options.rb
+ os.rb
+ os/linux.rb
+ os/linux/elf.rb
+ os/linux/glibc.rb
+ os/mac.rb
+ os/mac/keg.rb
+ os/mac/mach.rb
+ os/mac/sdk.rb
+ os/mac/xcode.rb
+ patch.rb
+ pkg_version.rb
+ readall.rb
+ reinstall.rb
+ requirement.rb
+ requirements/arch_requirement.rb
+ requirements/codesign_requirement.rb
+ requirements/macos_requirement.rb
+ requirements/xcode_requirement.rb
+ resource.rb
+ resource_auditor.rb
+ rubocops/blank.rb
+ rubocops/bottle.rb
+ rubocops/cask/array_alphabetization.rb
+ rubocops/cask/ast/cask_block.rb
+ rubocops/cask/ast/cask_header.rb
+ rubocops/cask/ast/stanza.rb
+ rubocops/cask/constants/stanza.rb
+ rubocops/cask/desc.rb
+ rubocops/cask/discontinued.rb
+ rubocops/cask/extend/node.rb
+ rubocops/cask/homepage_url_styling.rb
+ rubocops/cask/mixin/cask_help.rb
+ rubocops/cask/mixin/on_desc_stanza.rb
+ rubocops/cask/mixin/on_homepage_stanza.rb
+ rubocops/cask/mixin/on_url_stanza.rb
+ rubocops/cask/no_overrides.rb
+ rubocops/cask/on_system_conditionals.rb
+ rubocops/cask/shared_filelist_glob.rb
+ rubocops/cask/stanza_grouping.rb
+ rubocops/cask/stanza_order.rb
+ rubocops/cask/url.rb
+ rubocops/cask/url_legacy_comma_separators.rb
+ rubocops/cask/variables.rb
+ rubocops/caveats.rb
+ rubocops/checksum.rb
+ rubocops/class.rb
+ rubocops/compact_blank.rb
+ rubocops/components_order.rb
+ rubocops/components_redundancy.rb
+ rubocops/conflicts.rb
+ rubocops/dependency_order.rb
+ rubocops/deprecate_disable.rb
+ rubocops/desc.rb
+ rubocops/extend/formula_cop.rb
+ rubocops/files.rb
+ rubocops/homepage.rb
+ rubocops/install_bundler_gems.rb
+ rubocops/io_read.rb
+ rubocops/keg_only.rb
+ rubocops/lines.rb
+ rubocops/livecheck.rb
+ rubocops/move_to_extend_os.rb
+ rubocops/negate_include.rb
+ rubocops/options.rb
+ rubocops/patches.rb
+ rubocops/presence.rb
+ rubocops/present.rb
+ rubocops/resource_requires_dependencies.rb
+ rubocops/safe_navigation_with_blank.rb
+ rubocops/service.rb
+ rubocops/shared/desc_helper.rb
+ rubocops/shared/helper_functions.rb
+ rubocops/shared/homepage_helper.rb
+ rubocops/shared/on_system_conditionals_helper.rb
+ rubocops/shared/url_helper.rb
+ rubocops/shell_commands.rb
+ rubocops/text.rb
+ rubocops/urls.rb
+ rubocops/uses_from_macos.rb
+ rubocops/version.rb
+ sbom.rb
+ search.rb
+ service.rb
+ settings.rb
+ simulate_system.rb
+ software_spec.rb
+ sorbet/parlour.rb
+ standalone/init.rb
+ standalone/sorbet.rb
+ startup/config.rb
+ startup/ruby_path.rb
+ style.rb
+ system_command.rb
+ system_config.rb
+ tab.rb
+ tap.rb
+ tap_auditor.rb
+ test.rb
+ test/support/fixtures/failball.rb
+ test/support/fixtures/failball_offline_install.rb
+ test/support/fixtures/testball.rb
+ test/support/fixtures/testball_bottle.rb
+ test/support/fixtures/testball_bottle_cellar.rb
+ test/support/helper/cask/install_helper.rb
+ test/support/helper/cask/never_sudo_system_command.rb
+ test/support/helper/files.rb
+ test/support/helper/fixtures.rb
+ test/support/helper/integration_mocks.rb
+ test/support/lib/startup/config.rb
+ test/support/quiet_progress_formatter.rb
+ uninstall.rb
+ unlink.rb
+ unpack_strategy.rb
+ unpack_strategy/air.rb
+ unpack_strategy/bazaar.rb
+ unpack_strategy/bzip2.rb
+ unpack_strategy/cab.rb
+ unpack_strategy/compress.rb
+ unpack_strategy/cvs.rb
+ unpack_strategy/directory.rb
+ unpack_strategy/dmg.rb
+ unpack_strategy/executable.rb
+ unpack_strategy/fossil.rb
+ unpack_strategy/generic_unar.rb
+ unpack_strategy/git.rb
+ unpack_strategy/gzip.rb
+ unpack_strategy/jar.rb
+ unpack_strategy/lha.rb
+ unpack_strategy/lua_rock.rb
+ unpack_strategy/lzip.rb
+ unpack_strategy/lzma.rb
+ unpack_strategy/mercurial.rb
+ unpack_strategy/microsoft_office_xml.rb
+ unpack_strategy/otf.rb
+ unpack_strategy/p7zip.rb
+ unpack_strategy/pax.rb
+ unpack_strategy/pkg.rb
+ unpack_strategy/rar.rb
+ unpack_strategy/self_extracting_executable.rb
+ unpack_strategy/sit.rb
+ unpack_strategy/subversion.rb
+ unpack_strategy/tar.rb
+ unpack_strategy/ttf.rb
+ unpack_strategy/xar.rb
+ unpack_strategy/xz.rb
+ unpack_strategy/zstd.rb
+ unversioned_cask_checker.rb
+ upgrade.rb
+ url.rb
+ utils.rb
+ utils/analytics.rb
+ utils/bottles.rb
+ utils/curl.rb
+ utils/fork.rb
+ utils/formatter.rb
+ utils/gems.rb
+ utils/git.rb
+ utils/github.rb
+ utils/github/actions.rb
+ utils/github/api.rb
+ utils/github/artifacts.rb
+ utils/inreplace.rb
+ utils/link.rb
+ utils/popen.rb
+ utils/pypi.rb
+ utils/repology.rb
+ utils/ruby_check_version_script.rb
+ utils/service.rb
+ utils/shared_audits.rb
+ utils/shebang.rb
+ utils/shell.rb
+ utils/spdx.rb
+ utils/svn.rb
+ utils/tar.rb
+ utils/topological_hash.rb
+ utils/tty.rb
+ utils/user.rb
+ warnings.rb
+ yard/docstring_parser.rb
+ yard/templates/default/docstring/html/setup.rb
Run spoom bump --from true --to strict locally then commit the changes and push them My first task is the above, specifically |
Follow-up work for dev-cmd and patterns to be aware of for future conversions:
|
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.Provide a detailed description of the proposed feature
We should use Sorbet's
typed: strict
for all (non-package i.e. not casks or formulae) files in the Homebrew organisation.Some good transition steps will include:
typed: strict
on all new filesbrew test-bot
for tapstyped: strict
in all Homebrew/brew and tap filesWhat is the motivation for the feature?
How will the feature be relevant to at least 90% of Homebrew users?
Making Homebrew more reliable.
What alternatives to the feature have been considered?
Not doing this.
The text was updated successfully, but these errors were encountered: