molinillo 0.6.1 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '058fb8f202cdd62307106904580d3fc0b8f906c3'
4
- data.tar.gz: ffedb580a16d6b73f469199c93dae9634e6be9c0
3
+ metadata.gz: 5b31401d705c0bd1b9839f3b560996af5339a632
4
+ data.tar.gz: daabc784cc8a0385da64f2befa949887c70e3502
5
5
  SHA512:
6
- metadata.gz: 90be827ec5b343a49c0ac22a2aec00f751d84a774e5505e4284ecae8d3f0c7a968b34ec1de97ccbcf0efa9e2d7440e6cc1ef2cc1966855bf4246b136bc04e4e5
7
- data.tar.gz: ada1a30e9ffb745c1a0e605628ba54f77bffdeabf88482129ea731f19702593d1754cc83ff048b0518a98018476530c008163a2a492059760e8a35a3190b4ecb
6
+ metadata.gz: 139afb59678e775ae0e93214dfa78e13f1da4b4e73a42b514ab696818cfa00947e57b16a01b4582dbbc2563c222166c3779e032e899244cebf95f4573259ee7b
7
+ data.tar.gz: 708818cffc500e0f686a51e6025d254150408e206d48e176b5fa97d6466bd8efcf3897ab6fc4f21602197e5c1ac56b5f623b796617741451be77f5d182126ca0
@@ -18,7 +18,7 @@ This stack-based approach is used because backtracking (also known as *unwinding
18
18
  2. The client calls `resolve` with an array of user-requested dependencies and an optional 'locking' `DependencyGraph`
19
19
  3. The `Resolver` creates a new `Resolution` with those four user-specified parameters and calls `resolve` on it
20
20
  4. The `Resolution` creates an `initial_state`, which takes the user-requested dependencies and puts them into a `DependencyState`
21
- - In the process of creating the state, the `SpecificationProvider` is asked to sort the dependencies and return all the `possibilities` for the `initial_requirement` (taking into account whether the dependency is `locked`). These possibilities are then grouped into `PossibilitySet`s, with each set representing a group of versions for the dependency which share the same sub-dependency requirements
21
+ - In the process of creating the state, the `SpecificationProvider` is asked to sort the dependencies and return all the `possibilities` for the `initial_requirement` (taking into account whether the dependency is `locked`). These possibilities are then grouped into `PossibilitySet`s, with each set representing a group of versions for the dependency which share the same sub-dependency requirements and are contiguous
22
22
  - A `DependencyGraph` is created that has all of these requirements point to `root_vertices`
23
23
  5. The resolution process now enters its main loop, which continues as long as there is a current `state` to process, and the current state has requirements left to process
24
24
  6. `UI#indicate_progress` is called to allow the client to report progress
@@ -1,5 +1,19 @@
1
1
  # Molinillo Changelog
2
2
 
3
+ ## 0.6.2 (2017-08-25)
4
+
5
+ ##### Enhancements
6
+
7
+ * None.
8
+
9
+ ##### Bug Fixes
10
+
11
+ * Insist each PossibilitySet contains contiguous versions. Fixes a regression
12
+ where an older dependency version with identical sub-dependencies to the
13
+ latest version may be preferred over the second-latest version.
14
+ [Grey Baker](https://github.com/greysteil)
15
+
16
+
3
17
  ## 0.6.1 (2017-08-01)
4
18
 
5
19
  ##### Enhancements
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Molinillo
4
4
  # The version of Molinillo.
5
- VERSION = '0.6.1'.freeze
5
+ VERSION = '0.6.2'.freeze
6
6
  end
@@ -791,24 +791,25 @@ module Molinillo
791
791
  end
792
792
 
793
793
  # Build an array of PossibilitySets, with each element representing a group of
794
- # dependency versions that all have the same sub-dependency version constraints.
794
+ # dependency versions that all have the same sub-dependency version constraints
795
+ # and are contiguous.
795
796
  # @param [Array] an array of possibilities
796
797
  # @return [Array] an array of possibility sets
797
798
  def group_possibilities(possibilities)
798
799
  possibility_sets = []
799
- possibility_sets_index = {}
800
+ current_possibility_set = nil
800
801
 
801
802
  possibilities.reverse_each do |possibility|
802
803
  dependencies = dependencies_for(possibility)
803
- if index = possibility_sets_index[dependencies]
804
- possibility_sets[index].possibilities.unshift(possibility)
804
+ if current_possibility_set && current_possibility_set.dependencies == dependencies
805
+ current_possibility_set.possibilities.unshift(possibility)
805
806
  else
806
- possibility_sets << PossibilitySet.new(dependencies, [possibility])
807
- possibility_sets_index[dependencies] = possibility_sets.count - 1
807
+ possibility_sets.unshift(PossibilitySet.new(dependencies, [possibility]))
808
+ current_possibility_set = possibility_sets.first
808
809
  end
809
810
  end
810
811
 
811
- possibility_sets.reverse
812
+ possibility_sets
812
813
  end
813
814
 
814
815
  # Pushes a new {DependencyState}.
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.1
4
+ version: 0.6.2
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: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler