Skip to content

Commit

Permalink
Homebrew 4.3.0 deprecation/disable/removals.
Browse files Browse the repository at this point in the history
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
  • Loading branch information
MikeMcQuaid committed May 7, 2024
1 parent 621dce8 commit cd277da
Show file tree
Hide file tree
Showing 48 changed files with 78 additions and 731 deletions.
1 change: 0 additions & 1 deletion Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Layout/LineLength:
' url "',
' mirror "',
" plist_options ",
' appcast "',
' executable: "',
' font "',
' homepage "',
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def audit_latest_with_auto_updates

sig { params(livecheck_result: T.any(NilClass, T::Boolean, Symbol)).void }
def audit_hosting_with_livecheck(livecheck_result: audit_livecheck_version)
return if cask.discontinued? || cask.deprecated? || cask.disabled?
return if cask.deprecated? || cask.disabled?
return if cask.version&.latest?
return unless cask.url
return if block_url_offline?
Expand Down Expand Up @@ -682,7 +682,7 @@ def audit_gitlab_prerelease_version
sig { void }
def audit_github_repository_archived
# Deprecated/disabled casks may have an archived repository.
return if cask.discontinued? || cask.deprecated? || cask.disabled?
return if cask.deprecated? || cask.disabled?

user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if online?
return if user.nil?
Expand All @@ -696,7 +696,7 @@ def audit_github_repository_archived
sig { void }
def audit_gitlab_repository_archived
# Deprecated/disabled casks may have an archived repository.
return if cask.discontinued? || cask.deprecated? || cask.disabled?
return if cask.deprecated? || cask.disabled?

user, repo = get_repo_data(%r{https?://gitlab\.com/([^/]+)/([^/]+)/?.*}) if online?
return if user.nil?
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ def to_h
"homepage" => homepage,
"url" => url,
"url_specs" => url_specs,
"appcast" => appcast,
"version" => version,
"installed" => installed_version,
"installed_time" => install_time&.to_i,
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/cask/cask.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

module Cask
class Cask
def appcast; end

def appdir; end

def artifacts; end
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/cask/cask_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ def load(config:)
end

url json_cask[:url], **json_cask.fetch(:url_specs, {}) if json_cask[:url].present?
appcast json_cask[:appcast] if json_cask[:appcast].present?
json_cask[:name]&.each do |cask_name|
name cask_name
end
Expand Down
12 changes: 1 addition & 11 deletions Library/Homebrew/cask/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,6 @@ def url(*args, **options, &block)
end
end

# Sets the cask's appcast URL.
#
# @api public
def appcast(*args, **kwargs)
set_unique_stanza(:appcast, args.empty? && kwargs.empty?) do
odisabled "the `appcast` stanza", "the `livecheck` stanza"
true
end
end

# Sets the cask's container type or nested container path.
#
# ### Examples
Expand Down Expand Up @@ -417,7 +407,7 @@ def caveats(*strings, &block)
end

def discontinued?
# odeprecated "`discontinued?`", "`deprecated?` or `disabled?`"
odeprecated "`discontinued?`", "`deprecated?` or `disabled?`"

Check warning on line 410 in Library/Homebrew/cask/dsl.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/dsl.rb#L410

Added line #L410 was not covered by tests
@caveats&.discontinued? == true
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def eval_caveats(&block)
end

caveat :discontinued do
# odeprecated "`caveats :discontinued`", "`deprecate!`"
odeprecated "`caveats :discontinued`", "`deprecate!`"

Check warning on line 167 in Library/Homebrew/cask/dsl/caveats.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/dsl/caveats.rb#L167

Added line #L167 was not covered by tests
@discontinued = true
<<~EOS
#{@cask} has been officially discontinued upstream.
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/cask/dsl/postflight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class DSL
# Class corresponding to the `postflight` stanza.
class Postflight < Base
include Staged

def suppress_move_to_applications(**_options)
odisabled "`Cask::DSL::Postflight#suppress_move_to_applications`"
end
end
end
end
6 changes: 1 addition & 5 deletions Library/Homebrew/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,11 @@ def elisp_caveats
end

def service_caveats
return if !formula.plist && !formula.service? && !Utils::Service.installed?(formula) && !keg&.plist_installed?
return if !formula.service? && !Utils::Service.installed?(formula) && !keg&.plist_installed?
return if formula.service? && !formula.service.command? && !Utils::Service.installed?(formula)

s = []

return <<~EOS if !Utils::Service.launchctl? && formula.plist
#{Formatter.warning("Warning:")} #{formula.name} provides a launchd plist which can only be used on macOS!
EOS

# Brew services only works with these two tools
return <<~EOS if !Utils::Service.systemctl? && !Utils::Service.launchctl? && formula.service.command?
#{Formatter.warning("Warning:")} #{formula.name} provides a service which can only be used on macOS or systemd!
Expand Down
169 changes: 0 additions & 169 deletions Library/Homebrew/cmd/postgresql-upgrade-database.rb

This file was deleted.

Loading

0 comments on commit cd277da

Please sign in to comment.