Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Fixes #15227.
Overview
This was originally used by the API but was replaced months ago by
SimulateSystem
. Essentially, it's only current use was in theCask::Cask#to_h
method but is not used internally at all when creating cask instances from the API JSON.Details
It was added to brew in #11915 and added to the
formulae.brew.sh
website in Homebrew/formulae.brew.sh#539. The use in theformulae.brew.sh
website was later removed in Homebrew/formulae.brew.sh@b5704d4 so the only remaining references are in the main brew repo.The
Cask::Cask#os_versions
method was only called inCask::Cask#to_h
to create theversions
field in the JSON representation. It is not referenced at all inCask::CaskLoader
so isn't needed when loading cask instances from the JSON.An added bonus is that removing this will speed up JSON generation a lot. It was very slow before because it required reloading casks a bunch of times.
Before
After
I also updated some test fixtures to remove the
versions
field.