molinillo 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 135680d0c4a7de58ac3e44505fa78ba73921c167a67f0772f5017ba6acb4c211
4
- data.tar.gz: 41d3c7dde1f4925aa33cb534864a0d7d49c7372969db393f8e0c02410c9bd5a4
3
+ metadata.gz: da3743b5073c8c2e1f9188f3ac2178be94174d80b4450effc94af78b9a06eaba
4
+ data.tar.gz: a0684796c7423561761e311a3fdfd16195ead3bacda4abd9741bb6419c8199c6
5
5
  SHA512:
6
- metadata.gz: 7a81b3d5f68f54505f2ca431c302396a7e9d3d708e2ab51d4b9fd8c0eb8de7adce18de8e54738c3d49d3b4c4f2f5d03a791647369fb1fbd200537aac579b7fff
7
- data.tar.gz: 3b2401002e64b4425d19f28f19b95d26ffa250eaa3dfc1ce1b2e7cdb8617aa799336bf8deee1f9e0c1f02f240b51133715d9500ca204319c693acd751c2ff91b
6
+ metadata.gz: 59876ee8b9694c9e8e3e4c2b352a0a927c0fa3c496a1c2218d9d9df9d7592a0315915eb356b062f9b108341805d71349a5234c33fbb144dc1b2e493edc92f655
7
+ data.tar.gz: 062b07e84a80b99608c58681ce4bd2c23b12e0047ce90f0553f586449b5812e86b8df5f59d4ff7869660c6c0fc58bcf069db7c127c4c0773a186746bf12672cd
@@ -1,5 +1,22 @@
1
1
  # Molinillo Changelog
2
2
 
3
+ ## 0.6.6 (2018-08-07)
4
+
5
+ ##### Enhancements
6
+
7
+ * Improve performance of `Vertex#path_to?`.
8
+ [Samuel Giddins](https://github.com/segiddins)
9
+
10
+ * Allow customization of string used to say that a version conflict has occurred
11
+ for a particular name by passing in the `:incompatible_version_message_for_conflict`
12
+ key when constructing a version conflict message with trees.
13
+ [Samuel Giddins](https://github.com/segiddins)
14
+
15
+ ##### Bug Fixes
16
+
17
+ * None.
18
+
19
+
3
20
  ## 0.6.5 (2018-03-22)
4
21
 
5
22
  ##### Enhancements
@@ -130,11 +130,21 @@ module Molinillo
130
130
  # dependency graph?
131
131
  # @return true iff there is a path following edges within this {#graph}
132
132
  def path_to?(other)
133
- equal?(other) || successors.any? { |v| v.path_to?(other) }
133
+ _path_to?(other)
134
134
  end
135
135
 
136
136
  alias descendent? path_to?
137
137
 
138
+ # @param [Vertex] other the vertex to check if there's a path to
139
+ # @param [Set<Vertex>] visited the vertices of {#graph} that have been visited
140
+ # @return [Boolean] whether there is a path to `other` from `self`
141
+ def _path_to?(other, visited = Set.new)
142
+ return false unless visited.add?(self)
143
+ return true if equal?(other)
144
+ successors.any? { |v| v._path_to?(other, visited) }
145
+ end
146
+ protected :_path_to?
147
+
138
148
  # Is there a path from `other` to `self` following edges in the
139
149
  # dependency graph?
140
150
  # @return true iff there is a path following edges within this {#graph}
@@ -18,7 +18,7 @@ module Molinillo
18
18
  # @param [Array<Object>] required_by @see {#required_by}
19
19
  def initialize(dependency, required_by = [])
20
20
  @dependency = dependency
21
- @required_by = required_by
21
+ @required_by = required_by.uniq
22
22
  super()
23
23
  end
24
24
 
@@ -101,9 +101,14 @@ module Molinillo
101
101
  printable_requirement = opts.delete(:printable_requirement) { proc { |req| req.to_s } }
102
102
  additional_message_for_conflict = opts.delete(:additional_message_for_conflict) { proc {} }
103
103
  version_for_spec = opts.delete(:version_for_spec) { proc(&:to_s) }
104
+ incompatible_version_message_for_conflict = opts.delete(:incompatible_version_message_for_conflict) do
105
+ proc do |name, _conflict|
106
+ %(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
107
+ end
108
+ end
104
109
 
105
110
  conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
106
- o << %(\n#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":\n)
111
+ o << "\n" << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
107
112
  if conflict.locked_requirement
108
113
  o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
109
114
  o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Molinillo
4
4
  # The version of Molinillo.
5
- VERSION = '0.6.5'.freeze
5
+ VERSION = '0.6.6'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: molinillo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
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: 2018-03-22 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.7.6
93
+ rubygems_version: 2.7.7
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Provides support for dependency resolution