Skip to content

livecheck: compare actual version for casks#10348

Merged
SeekingMeaning merged 1 commit intoHomebrew:masterfrom
SeekingMeaning:livecheck-actual-version
Jan 20, 2021
Merged

livecheck: compare actual version for casks#10348
SeekingMeaning merged 1 commit intoHomebrew:masterfrom
SeekingMeaning:livecheck-actual-version

Conversation

@SeekingMeaning
Copy link
Copy Markdown
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

Tested with Homebrew/homebrew-cask#98130

Before:

$ brew livecheck --cask adoptopenjdk
adoptopenjdk : 15.0.1,9.1 ==> 15,36

After:

$ brew livecheck --cask adoptopenjdk
adoptopenjdk : 15.0.1,9.1 ==> 15.0.1,9

@BrewTestBot
Copy link
Copy Markdown
Contributor

Review period will end on 2021-01-19 at 00:00:00 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 17, 2021
when Cask::Cask
cask_name(formula_or_cask, full_name: full_name)
else
T.absurd(formula_or_cask)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this do?

Copy link
Copy Markdown
Contributor Author

@SeekingMeaning SeekingMeaning Jan 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we ever change the type of formula_or_cask from

T.any(Formula, Cask::Cask)

to say,

T.any(Formula, Cask::Cask, Thing)

then Sorbet will give an error since we don't handle the case for when formula_or_cask is a Thing

(Admittedly, this is a bit redundant since the name formula_or_cask itself implies that it can only be a Formula or Cask)

Related: https://sorbet.org/docs/exhaustiveness

T.absurd(...) is implemented both statically and at runtime. Statically Sorbet will report an error, and at runtime Sorbet will raise an exception.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I delete?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly either way, up to you! Thanks for explaining ❤️

@BrewTestBot
Copy link
Copy Markdown
Contributor

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 19, 2021
@SeekingMeaning SeekingMeaning merged commit e42e981 into Homebrew:master Jan 20, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Feb 20, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants