molinillo 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/molinillo/modules/ui.rb +3 -2
- data/lib/molinillo/resolution.rb +14 -12
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca54c31b0225c0a70bd08056c807459893d8b05
|
4
|
+
data.tar.gz: d044395b17ede295d35e8663bbeba8c5f0ab91c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbb0cc34b7ec121f29199e73115e1e1b6231662325c36852ca552c894e031e533adc996c56642a61e60f6410234006dcc42de20068c15bc8c49cd15629c3abdc
|
7
|
+
data.tar.gz: 30e5ffb3e3bd50da99a14cccdf3d3eecc34c8c5887f3c1503913e97c4f311303cd0d0e982ccfd6e1853173ba0b3a5b28216b84e00fb3e008937283c619a834b9
|
data/lib/molinillo/modules/ui.rb
CHANGED
@@ -53,11 +53,12 @@ module Molinillo
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# Whether or not debug messages should be printed.
|
56
|
-
# By default, whether or not the `
|
56
|
+
# By default, whether or not the `MOLINILLO_DEBUG` environment variable is
|
57
|
+
# set.
|
57
58
|
#
|
58
59
|
# @return [Boolean]
|
59
60
|
def debug?
|
60
|
-
@debug_mode ||= ENV['
|
61
|
+
@debug_mode ||= ENV['MOLINILLO_DEBUG']
|
61
62
|
end
|
62
63
|
end
|
63
64
|
end
|
data/lib/molinillo/resolution.rb
CHANGED
@@ -55,7 +55,7 @@ module Molinillo
|
|
55
55
|
break unless state.requirements.any? || state.requirement
|
56
56
|
indicate_progress
|
57
57
|
if state.respond_to?(:pop_possibility_state) # DependencyState
|
58
|
-
debug(depth) { "
|
58
|
+
debug(depth) { "Creating possibility state (#{possibilities.count} remaining)" }
|
59
59
|
state.pop_possibility_state.tap { |s| states.push(s) if s }
|
60
60
|
end
|
61
61
|
process_topmost_state
|
@@ -75,7 +75,7 @@ module Molinillo
|
|
75
75
|
|
76
76
|
states.push(initial_state)
|
77
77
|
|
78
|
-
debug { "
|
78
|
+
debug { "Starting resolution (#{@started_at})" }
|
79
79
|
resolver_ui.before_resolution
|
80
80
|
end
|
81
81
|
|
@@ -84,11 +84,11 @@ module Molinillo
|
|
84
84
|
def end_resolution
|
85
85
|
resolver_ui.after_resolution
|
86
86
|
debug do
|
87
|
-
"
|
88
|
-
"(
|
87
|
+
"Finished resolution (#{@iteration_counter} steps) " \
|
88
|
+
"(Took #{(ended_at = Time.now) - @started_at} seconds) (#{ended_at})"
|
89
89
|
end
|
90
|
-
debug { '
|
91
|
-
debug { '
|
90
|
+
debug { 'Unactivated: ' + Hash[activated.vertices.reject { |_n, v| v.payload }].keys.join(', ') } if state
|
91
|
+
debug { 'Activated: ' + Hash[activated.vertices.select { |_n, v| v.payload }].keys.join(', ') } if state
|
92
92
|
end
|
93
93
|
|
94
94
|
require 'molinillo/state'
|
@@ -115,9 +115,11 @@ module Molinillo
|
|
115
115
|
begin
|
116
116
|
specification_provider.send(instance_method, *args, &block)
|
117
117
|
rescue NoSuchDependencyError => error
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
if state
|
119
|
+
vertex = activated.vertex_named(name_for error.dependency)
|
120
|
+
error.required_by += vertex.incoming_edges.map { |e| e.origin.name }
|
121
|
+
error.required_by << name_for_explicit_dependency_source unless vertex.explicit_requirements.empty?
|
122
|
+
end
|
121
123
|
raise
|
122
124
|
end
|
123
125
|
end
|
@@ -225,7 +227,7 @@ module Molinillo
|
|
225
227
|
# Attempts to activate the current {#possibility}
|
226
228
|
# @return [void]
|
227
229
|
def attempt_to_activate
|
228
|
-
debug(depth) { '
|
230
|
+
debug(depth) { 'Attempting to activate ' + possibility.to_s }
|
229
231
|
existing_node = activated.vertex_named(name)
|
230
232
|
if existing_node && existing_node.payload
|
231
233
|
attempt_to_activate_existing_spec(existing_node)
|
@@ -283,7 +285,7 @@ module Molinillo
|
|
283
285
|
# @return [void]
|
284
286
|
def activate_spec
|
285
287
|
conflicts.delete(name)
|
286
|
-
debug(depth) { '
|
288
|
+
debug(depth) { 'Activated ' + name + ' at ' + possibility.to_s }
|
287
289
|
vertex = activated.vertex_named(name)
|
288
290
|
vertex.payload = possibility
|
289
291
|
require_nested_dependencies_for(possibility)
|
@@ -295,7 +297,7 @@ module Molinillo
|
|
295
297
|
# @return [void]
|
296
298
|
def require_nested_dependencies_for(activated_spec)
|
297
299
|
nested_dependencies = dependencies_for(activated_spec)
|
298
|
-
debug(depth) { "
|
300
|
+
debug(depth) { "Requiring nested dependencies (#{nested_dependencies.map(&:to_s).join(', ')})" }
|
299
301
|
nested_dependencies.each { |d| activated.add_child_vertex name_for(d), nil, [name_for(activated_spec)], d }
|
300
302
|
|
301
303
|
push_state_for_requirements(requirements + nested_dependencies)
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: molinillo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel E. Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description:
|
@@ -45,6 +45,9 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- LICENSE
|
49
|
+
- README.md
|
50
|
+
- lib/molinillo.rb
|
48
51
|
- lib/molinillo/dependency_graph.rb
|
49
52
|
- lib/molinillo/errors.rb
|
50
53
|
- lib/molinillo/gem_metadata.rb
|
@@ -53,15 +56,12 @@ files:
|
|
53
56
|
- lib/molinillo/resolution.rb
|
54
57
|
- lib/molinillo/resolver.rb
|
55
58
|
- lib/molinillo/state.rb
|
56
|
-
- lib/molinillo.rb
|
57
|
-
- README.md
|
58
|
-
- LICENSE
|
59
59
|
- spec/dependency_graph_spec.rb
|
60
60
|
- spec/resolver_spec.rb
|
61
|
+
- spec/spec_helper.rb
|
61
62
|
- spec/spec_helper/index.rb
|
62
63
|
- spec/spec_helper/specification.rb
|
63
64
|
- spec/spec_helper/ui.rb
|
64
|
-
- spec/spec_helper.rb
|
65
65
|
- spec/state_spec.rb
|
66
66
|
homepage: https://github.com/CocoaPods/Molinillo
|
67
67
|
licenses:
|
@@ -73,17 +73,17 @@ require_paths:
|
|
73
73
|
- lib
|
74
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.2.2
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Provides support for dependency resolution
|
@@ -95,4 +95,3 @@ test_files:
|
|
95
95
|
- spec/spec_helper/ui.rb
|
96
96
|
- spec/spec_helper.rb
|
97
97
|
- spec/state_spec.rb
|
98
|
-
has_rdoc:
|