Skip to content
Snippets Groups Projects
Commit 45a7730f authored by Mike McQuaid's avatar Mike McQuaid
Browse files

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.
parent e7e53b89
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
require "hardware"
require "extend/ENV/shared"
# TODO: deprecate compiling related codes after it's only used by brew test.
# @private
module Stdenv
include SharedEnvExtension
......
......@@ -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
......
......@@ -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.
......
......@@ -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
......@@ -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",
......
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment