Skip to content

Commit

Permalink
[Resolution] Capitalise all debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Nov 3, 2014
1 parent 67d0920 commit 492aefd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/molinillo/resolution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def resolve
break unless state.requirements.any? || state.requirement
indicate_progress
if state.respond_to?(:pop_possibility_state) # DependencyState
debug(depth) { "creating possibility state (#{possibilities.count} remaining)" }
debug(depth) { "Creating possibility state (#{possibilities.count} remaining)" }
state.pop_possibility_state.tap { |s| states.push(s) if s }
end
process_topmost_state
Expand All @@ -75,7 +75,7 @@ def start_resolution

states.push(initial_state)

debug { "starting resolution (#{@started_at})" }
debug { "Starting resolution (#{@started_at})" }
resolver_ui.before_resolution
end

Expand All @@ -84,11 +84,11 @@ def start_resolution
def end_resolution
resolver_ui.after_resolution
debug do
"finished resolution (#{@iteration_counter} steps) " \
"(took #{(ended_at = Time.now) - @started_at} seconds) (#{ended_at})"
"Finished resolution (#{@iteration_counter} steps) " \
"(Took #{(ended_at = Time.now) - @started_at} seconds) (#{ended_at})"
end
debug { 'unactivated: ' + Hash[activated.vertices.reject { |_n, v| v.payload }].keys.join(', ') }
debug { 'activated: ' + Hash[activated.vertices.select { |_n, v| v.payload }].keys.join(', ') }
debug { 'Unactivated: ' + Hash[activated.vertices.reject { |_n, v| v.payload }].keys.join(', ') }
debug { 'Activated: ' + Hash[activated.vertices.select { |_n, v| v.payload }].keys.join(', ') }
end

require 'molinillo/state'
Expand Down Expand Up @@ -225,7 +225,7 @@ def debug(depth = 0, &block)
# Attempts to activate the current {#possibility}
# @return [void]
def attempt_to_activate
debug(depth) { 'attempting to activate ' + possibility.to_s }
debug(depth) { 'Attempting to activate ' + possibility.to_s }
existing_node = activated.vertex_named(name)
if existing_node && existing_node.payload
attempt_to_activate_existing_spec(existing_node)
Expand Down Expand Up @@ -283,7 +283,7 @@ def locked_requirement_named(requirement_name)
# @return [void]
def activate_spec
conflicts.delete(name)
debug(depth) { 'activated ' + name + ' at ' + possibility.to_s }
debug(depth) { 'Activated ' + name + ' at ' + possibility.to_s }
vertex = activated.vertex_named(name)
vertex.payload = possibility
require_nested_dependencies_for(possibility)
Expand All @@ -295,7 +295,7 @@ def activate_spec
# @return [void]
def require_nested_dependencies_for(activated_spec)
nested_dependencies = dependencies_for(activated_spec)
debug(depth) { "requiring nested dependencies (#{nested_dependencies.map(&:to_s).join(', ')})" }
debug(depth) { "Requiring nested dependencies (#{nested_dependencies.map(&:to_s).join(', ')})" }
nested_dependencies.each { |d| activated.add_child_vertex name_for(d), nil, [name_for(activated_spec)], d }

push_state_for_requirements(requirements + nested_dependencies)
Expand Down

0 comments on commit 492aefd

Please sign in to comment.