diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index aa38b54f4d..62cfd79c3e 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -23,8 +23,7 @@ end def require?(path) require path rescue LoadError => e - # HACK: ( because we should raise on syntax errors but - # not if the file doesn't exist. TODO make robust! + # we should raise on syntax errors but not if the file doesn't exist. raise unless e.to_s.include? path end diff --git a/Library/Homebrew/dependable.rb b/Library/Homebrew/dependable.rb index 0834b08eca..785eb94d8f 100644 --- a/Library/Homebrew/dependable.rb +++ b/Library/Homebrew/dependable.rb @@ -20,8 +20,6 @@ module Dependable end def required? - # FIXME: Should `required?` really imply `!build?`? And if so, why doesn't - # any of `optional?` and `recommended?` equally imply `!build?`? !build? && !optional? && !recommended? end diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index 403ea19783..aafc0a4519 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -1,7 +1,6 @@ require "hardware" require "extend/ENV/shared" -# TODO: deprecate compiling related codes after it's only used by brew test. # @private module Stdenv include SharedEnvExtension diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 690979e4ed..c413e9e94b 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -331,7 +331,6 @@ class Pathname raise ChecksumMismatchError.new(self, expected, actual) unless expected == actual end - # FIXME: eliminate the places where we rely on this method alias to_str to_s unless method_defined?(:to_str) def cd diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b32775c786..4ff5d3175f 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1908,7 +1908,6 @@ class Formula def exec_cmd(cmd, args, out, logfn) ENV["HOMEBREW_CC_LOG_PATH"] = logfn - # TODO: system "xcodebuild" is deprecated, this should be removed soon. ENV.remove_cc_etc if cmd.to_s.start_with? "xcodebuild" # Turn on argument filtering in the superenv compiler wrapper. diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 7fed4b24e8..2153e7671a 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -887,6 +887,6 @@ class FormulaInstaller def puts_requirement_messages return unless @requirement_messages return if @requirement_messages.empty? - puts @requirement_messages + $stderr.puts @requirement_messages end end diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 05af5bb670..6505ca54e0 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -62,7 +62,6 @@ ORIGINAL_PATHS = ENV["HOMEBREW_PATH"].split(File::PATH_SEPARATOR).map do |p| end end.compact.freeze -# TODO: remove this as soon as it's removed from commands.rb. HOMEBREW_INTERNAL_COMMAND_ALIASES = { "ls" => "list", "homepage" => "home", diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb index b82772faf7..2fdf0abead 100644 --- a/Library/Homebrew/os/mac/xquartz.rb +++ b/Library/Homebrew/os/mac/xquartz.rb @@ -5,7 +5,6 @@ module OS module XQuartz module_function - # TODO: confirm this path when you have internet DEFAULT_BUNDLE_PATH = Pathname.new("Applications/Utilities/XQuartz.app").freeze FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11".freeze APPLE_BUNDLE_ID = "org.x.X11".freeze diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index c1240a30e0..034bdd53f0 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -217,10 +217,9 @@ describe "brew install", :integration_test do depends_on NonFatalRequirement EOS - # FIXME: This should output to STDERR. expect { brew "install", "testball1" } - .to output(/NonFatalRequirement unsatisfied!/).to_stdout - .and not_to_output.to_stderr + .to output(/NonFatalRequirement unsatisfied!/).to_stderr + .and output(/built in/).to_stdout .and be_a_success end @@ -234,10 +233,9 @@ describe "brew install", :integration_test do depends_on FatalRequirement EOS - # FIXME: This should output to STDERR. expect { brew "install", "testball1" } - .to output(/FatalRequirement unsatisfied!/).to_stdout - .and output(/An unsatisfied requirement failed this build./).to_stderr + .to output(/FatalRequirement unsatisfied!/).to_stderr + .and not_to_output.to_stdout .and be_a_failure end end diff --git a/Library/Homebrew/utils/analytics.sh b/Library/Homebrew/utils/analytics.sh index 35f91eabc0..8d5cf2ff73 100644 --- a/Library/Homebrew/utils/analytics.sh +++ b/Library/Homebrew/utils/analytics.sh @@ -85,8 +85,6 @@ report-analytics-screenview-command() { fi # Don't report commands used mostly by our scripts and not users. - # TODO: list more e.g. shell completion things here perhaps using a single - # script as a shell-completion entry point. case "$HOMEBREW_COMMAND" in --prefix|analytics|command|commands) return diff --git a/bin/brew b/bin/brew index 84be2fb1d7..1c7b4c8971 100755 --- a/bin/brew +++ b/bin/brew @@ -47,8 +47,7 @@ HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library" for VAR in EDITOR PATH do VAR_NEW="HOMEBREW_${VAR}" - # TODO: find a better solution than this. - env | grep -q "$VAR_NEW" && continue + [[ -n "${!VAR_NEW}" ]] && continue export "$VAR_NEW"="${!VAR}" done