diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index 2266c178bb5dc8497906e7070774ace4b2bb1971..065cf9c65f716bba72a0910d70e403242c38b36c 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -1,4 +1,4 @@ -name: Update Sorbet-related files +name: Update Sorbet files on: push: paths: @@ -39,7 +39,8 @@ jobs: if brew typecheck --update --fail-if-not-changed; then git add "$GITHUB_WORKSPACE/Library/Homebrew/sorbet" - git commit -m "sorbet: Update RBI files and prune files.yaml." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml)." + git commit -m "sorbet: Update RBI files." \ + -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." echo "::set-output name=committed::true" if [ -n "$BRANCH_EXISTS" ]; then echo "::set-output name=pull_request::true" diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index b4af45936c10de8ea28d80e00986e79f6df98d1e..c8c45fa88ba9c4581b47531272ed602cd09ad8dc 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -6,8 +6,6 @@ require "cli/parser" module Homebrew module_function - SORBET_FILES_YAML = "sorbet/files.yaml" - def typecheck_args Homebrew::CLI::Parser.new do usage_banner <<~EOS @@ -18,10 +16,10 @@ module Homebrew switch "-q", "--quiet", description: "Silence all non-critical errors." switch "--update", - description: "Update RBI files and prune #{SORBET_FILES_YAML}" + description: "Update RBI files." switch "--fail-if-not-changed", description: "Return a failing status code if all gems are up to date " \ - "and gem definitions do not need a tapioca update" + "and gem definitions do not need a tapioca update." flag "--dir=", description: "Typecheck all files in a specific directory." flag "--file=", @@ -41,21 +39,6 @@ module Homebrew HOMEBREW_LIBRARY_PATH.cd do if args.update? - ohai "Checking for deleted filenames in #{SORBET_FILES_YAML}..." - lines_to_keep = [] - sorbet_keywords = ["true:", "false:", "strict:", "strong:"] - - File.readlines(SORBET_FILES_YAML).map(&:chomp).each do |line| - if sorbet_keywords.include?(line) || line.blank? - lines_to_keep << line - elsif line.end_with?(".rb") - filepath = line.split(" ").last - lines_to_keep << line if File.exist?(filepath) - end - - File.write(SORBET_FILES_YAML, "#{lines_to_keep.join("\n")}\n") - end - ohai "Updating Tapioca RBI files..." system "bundle", "exec", "tapioca", "sync" system "bundle", "exec", "srb", "rbi", "hidden-definitions" @@ -73,8 +56,6 @@ module Homebrew cd("sorbet") srb_exec += ["--file", "../#{args.file}"] if args.file srb_exec += ["--dir", "../#{args.dir}"] if args.dir - else - srb_exec += ["--typed-override", SORBET_FILES_YAML] end Homebrew.failed = !system(*srb_exec) end diff --git a/Library/Homebrew/sorbet/files.yaml b/Library/Homebrew/sorbet/files.yaml deleted file mode 100644 index b3db036f73deb70264dc65f27af16734ccfc01bd..0000000000000000000000000000000000000000 --- a/Library/Homebrew/sorbet/files.yaml +++ /dev/null @@ -1,3 +0,0 @@ -false: [] -true: [] -strict: [] diff --git a/docs/Manpage.md b/docs/Manpage.md index ad972b3e1e657c3eedc57ad7b1e3f314502102d8..63c1956acf27342afbc047a095de131c474227c6 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1258,9 +1258,9 @@ Check for typechecking errors using Sorbet. * `-q`, `--quiet`: Silence all non-critical errors. * `--update`: - Update RBI files and prune sorbet/files.yaml + Update RBI files. * `--fail-if-not-changed`: - Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update + Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update. * `--dir`: Typecheck all files in a specific directory. * `--file`: diff --git a/manpages/brew.1 b/manpages/brew.1 index f8d8da44729c58910649cd080cf0e4ead962e475..eff7c8d27e070d029bd242709809724d9189b150 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1743,11 +1743,11 @@ Silence all non\-critical errors\. . .TP \fB\-\-update\fR -Update RBI files and prune sorbet/files\.yaml +Update RBI files\. . .TP \fB\-\-fail\-if\-not\-changed\fR -Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update +Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update\. . .TP \fB\-\-dir\fR