This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
dependency_version_overlap.feature
68 lines (63 loc) · 2.85 KB
/
dependency_version_overlap.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Feature: Dependency Version Overlap Conflict Resolution
As a developer
In order to help eliminate dependency hell
I want Nu to automatically resolve dependency version collisions
Background:
Given I am talking about the PackageConflictOverlapResolver
Scenario: No conflict because of forgiving constraint range, downgrade a dependency
Given package "dependency (1.0.0)" exists
And package "dependency (1.0.1)" exists
And package "top (1.0.0)" exists and depends on:
| name | constraint |
| dependency | >=1.0.0, <1.1.0 |
And package "proposed (1.0.0)" exists and depends on:
| name | constraint |
| dependency | 1.0.0 |
And package "top (1.0.0)" is installed
And package "dependency (1.0.1)" is installed
When package "proposed (1.0.0)" is proposed
Then a conflict should not be detected
And the suggested version for package "top" should be "= 1.0.0"
And the suggested version for package "proposed" should be "= 1.0.0"
#this is the one that should be downgraded from 1.0.1
And the suggested version for package "dependency" should be "= 1.0.0"
Scenario: Multiple potential dependency versions acceptable, choose the highest
Given package "dep (1.0.0)" exists
And package "dep (1.0.3)" exists
And package "dep (1.0.1)" exists
And package "dep (1.0.2)" exists
And package "dep (1.1.0)" exists
And package "top (1.0.0)" exists and depends on:
| name | constraint |
| dep | >=1.0.0 |
And package "top (1.0.0)" is installed
And package "dep (1.0.0)" is installed
And package "proposed (1.0.0)" exists and depends on:
| name | constraint |
| dep | >= 1.0.1, < 1.1.0 |
When package "proposed (1.0.0)" is proposed
Then a conflict should not be detected
And the suggested version for package "dep" should be "= 1.0.3"
Scenario: Conflict is with a package that is not a dependency itself in the lib (this would have been requested explicitly)
Given package "explicit (1.0.0)" exists
And package "explicit (1.0.1)" exists
And package "explicit (1.0.0)" is installed
And package "interloper (2.0.0)" exists and depends on:
| name | constraint |
| explicit | >= 1.0.1, <= 1.4.0 |
When package "interloper (2.0.0)" is proposed
Then a conflict should be detected
And the conflicting package should be "explicit" between "= 1.0.0" and ">= 1.0.1, <= 1.4.0"
Scenario: Propose a package with dependencies that have dependencies
Given package "bottom (1.0.0)" exists
And package "middle (1.0.0)" exists and depends on:
| name | constraint |
| bottom | = 1.0.0 |
And package "top (1.0.0)" exists and depends on:
| name | constraint |
| middle | = 1.0.0 |
When package "top (1.0.0)" is proposed
Then a conflict should not be detected
And the suggested version for package "top" should be "= 1.0.0"
And the suggested version for package "middle" should be "= 1.0.0"
And the suggested version for package "bottom" should be "= 1.0.0"