diff --git a/.github/workflows/tapioca.yml b/.github/workflows/sorbet.yml similarity index 80% rename from .github/workflows/tapioca.yml rename to .github/workflows/sorbet.yml index 9f9b518243be6e2d8731c1c7c34d5416dedcf360..2266c178bb5dc8497906e7070774ace4b2bb1971 100644 --- a/.github/workflows/tapioca.yml +++ b/.github/workflows/sorbet.yml @@ -1,8 +1,8 @@ -name: Update Tapioca definitions +name: Update Sorbet-related files on: push: paths: - - .github/workflows/tapioca.yml + - .github/workflows/sorbet.yml branches-ignore: - master schedule: @@ -26,7 +26,7 @@ jobs: run: | git fetch origin - BRANCH="tapioca-update" + BRANCH="sorbet-files-update" echo "::set-output name=branch::${BRANCH}" if git ls-remote --exit-code --heads origin "$BRANCH"; then @@ -37,9 +37,9 @@ jobs: BRANCH_EXISTS="1" fi - if brew typecheck --prune-files-list --update-definitions --fail-if-not-changed; then + if brew typecheck --update --fail-if-not-changed; then git add "$GITHUB_WORKSPACE/Library/Homebrew/sorbet" - git commit -m "sorbet: update RBI files using Tapioca." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml)." + 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)." 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 18ecab17545c3043040d0d7b14dda8de2380d701..98825c6698ed965fe029d454d12d0ee9a44212c8 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -16,10 +16,8 @@ module Homebrew EOS switch "-q", "--quiet", description: "Silence all non-critical errors." - switch "--update-definitions", - description: "Update Tapioca gem definitions of recently bumped gems" - switch "--prune-files-list", - description: "Remove deleted filepaths from #{SORBET_FILES_YAML}" + switch "--update", + description: "Update RBI files and prune #{SORBET_FILES_YAML}" 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" @@ -41,7 +39,8 @@ module Homebrew Homebrew.install_bundler_gems! HOMEBREW_LIBRARY_PATH.cd do - if args.prune_files_list? + if args.update? + ohai "Checking for deleted filenames in #{SORBET_FILES_YAML}..." lines_to_keep = [] sorbet_keywords = ["true:", "false:", "strict:", "strong:"] @@ -52,12 +51,11 @@ module Homebrew filepath = line.split(" ").last lines_to_keep << line if File.exist?(filepath) end - end - File.write(SORBET_FILES_YAML, "#{lines_to_keep.join("\n")}\n") - end + File.write(SORBET_FILES_YAML, "#{lines_to_keep.join("\n")}\n") + end - if args.update_definitions? + ohai "Updating Tapioca RBI files..." system "bundle", "exec", "tapioca", "sync" system "bundle", "exec", "srb", "rbi", "hidden-definitions" system "bundle", "exec", "srb", "rbi", "todo" diff --git a/docs/Manpage.md b/docs/Manpage.md index 886e30c8d1957a3b02cf6bac2e8221865fa94015..9e3920301fdc2426987206a13ad13d66884bbdbe 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1244,10 +1244,8 @@ Check for typechecking errors using Sorbet. * `-q`, `--quiet`: Silence all non-critical errors. -* `--update-definitions`: - Update Tapioca gem definitions of recently bumped gems -* `--prune-files-list`: - Remove deleted filepaths from sorbet/files.yaml +* `--update`: + Update RBI files and prune sorbet/files.yaml * `--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 * `--dir`: diff --git a/manpages/brew.1 b/manpages/brew.1 index 98889a0434f3616b95cb9591d95174d5021d8907..8415cedd6e3adee0584e2ee4a6a4ffd963fdd27b 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1718,12 +1718,8 @@ Check for typechecking errors using Sorbet\. Silence all non\-critical errors\. . .TP -\fB\-\-update\-definitions\fR -Update Tapioca gem definitions of recently bumped gems -. -.TP -\fB\-\-prune\-files\-list\fR -Remove deleted filepaths from sorbet/files\.yaml +\fB\-\-update\fR +Update RBI files and prune sorbet/files\.yaml . .TP \fB\-\-fail\-if\-not\-changed\fR