Skip to content

Commit 45a7730

Browse files
committed
Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and remove the comments for those that can never be done.
1 parent e7e53b8 commit 45a7730

File tree

11 files changed

+7
-20
lines changed

11 files changed

+7
-20
lines changed

Library/Homebrew/brew.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
def require?(path)
2424
require path
2525
rescue LoadError => e
26-
# HACK: ( because we should raise on syntax errors but
27-
# not if the file doesn't exist. TODO make robust!
26+
# we should raise on syntax errors but not if the file doesn't exist.
2827
raise unless e.to_s.include? path
2928
end
3029

Library/Homebrew/dependable.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ def run?
2020
end
2121

2222
def required?
23-
# FIXME: Should `required?` really imply `!build?`? And if so, why doesn't
24-
# any of `optional?` and `recommended?` equally imply `!build?`?
2523
!build? && !optional? && !recommended?
2624
end
2725

Library/Homebrew/extend/ENV/std.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require "hardware"
22
require "extend/ENV/shared"
33

4-
# TODO: deprecate compiling related codes after it's only used by brew test.
54
# @private
65
module Stdenv
76
include SharedEnvExtension

Library/Homebrew/extend/pathname.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ def verify_checksum(expected)
331331
raise ChecksumMismatchError.new(self, expected, actual) unless expected == actual
332332
end
333333

334-
# FIXME: eliminate the places where we rely on this method
335334
alias to_str to_s unless method_defined?(:to_str)
336335

337336
def cd

Library/Homebrew/formula.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,6 @@ def versioned_prefix(v)
19081908
def exec_cmd(cmd, args, out, logfn)
19091909
ENV["HOMEBREW_CC_LOG_PATH"] = logfn
19101910

1911-
# TODO: system "xcodebuild" is deprecated, this should be removed soon.
19121911
ENV.remove_cc_etc if cmd.to_s.start_with? "xcodebuild"
19131912

19141913
# Turn on argument filtering in the superenv compiler wrapper.

Library/Homebrew/formula_installer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,6 @@ def unlock
887887
def puts_requirement_messages
888888
return unless @requirement_messages
889889
return if @requirement_messages.empty?
890-
puts @requirement_messages
890+
$stderr.puts @requirement_messages
891891
end
892892
end

Library/Homebrew/global.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def raise_deprecation_exceptions?
6262
end
6363
end.compact.freeze
6464

65-
# TODO: remove this as soon as it's removed from commands.rb.
6665
HOMEBREW_INTERNAL_COMMAND_ALIASES = {
6766
"ls" => "list",
6867
"homepage" => "home",

Library/Homebrew/os/mac/xquartz.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module Mac
55
module XQuartz
66
module_function
77

8-
# TODO: confirm this path when you have internet
98
DEFAULT_BUNDLE_PATH = Pathname.new("Applications/Utilities/XQuartz.app").freeze
109
FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11".freeze
1110
APPLE_BUNDLE_ID = "org.x.X11".freeze

Library/Homebrew/test/cmd/install_spec.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,9 @@ class NonFatalRequirement < Requirement
217217
depends_on NonFatalRequirement
218218
EOS
219219

220-
# FIXME: This should output to STDERR.
221220
expect { brew "install", "testball1" }
222-
.to output(/NonFatalRequirement unsatisfied!/).to_stdout
223-
.and not_to_output.to_stderr
221+
.to output(/NonFatalRequirement unsatisfied!/).to_stderr
222+
.and output(/built in/).to_stdout
224223
.and be_a_success
225224
end
226225

@@ -234,10 +233,9 @@ class FatalRequirement < Requirement
234233
depends_on FatalRequirement
235234
EOS
236235

237-
# FIXME: This should output to STDERR.
238236
expect { brew "install", "testball1" }
239-
.to output(/FatalRequirement unsatisfied!/).to_stdout
240-
.and output(/An unsatisfied requirement failed this build./).to_stderr
237+
.to output(/FatalRequirement unsatisfied!/).to_stderr
238+
.and not_to_output.to_stdout
241239
.and be_a_failure
242240
end
243241
end

Library/Homebrew/utils/analytics.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ report-analytics-screenview-command() {
8585
fi
8686

8787
# Don't report commands used mostly by our scripts and not users.
88-
# TODO: list more e.g. shell completion things here perhaps using a single
89-
# script as a shell-completion entry point.
9088
case "$HOMEBREW_COMMAND" in
9189
--prefix|analytics|command|commands)
9290
return

0 commit comments

Comments
 (0)