File tree 4 files changed +22
-21
lines changed
4 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,6 @@ pub enum ConflictCause {
248
248
/// - They all have the same name
249
249
/// - They all have the same predecessor nodes
250
250
/// - They all have the same successor nodes
251
- /// - None of them have incoming conflicting edges
252
251
pub ( crate ) struct MergedProblemNode {
253
252
pub ids : Vec < SolvableId > ,
254
253
}
@@ -370,14 +369,6 @@ impl ProblemGraph {
370
369
}
371
370
} ;
372
371
373
- if graph
374
- . edges_directed ( node_id, Direction :: Incoming )
375
- . any ( |e| matches ! ( e. weight( ) , ProblemEdge :: Conflict ( ..) ) )
376
- {
377
- // Nodes that are the target of a conflict should never be merged
378
- continue ;
379
- }
380
-
381
372
let predecessors: Vec < _ > = graph
382
373
. edges_directed ( node_id, Direction :: Incoming )
383
374
. map ( |e| e. source ( ) )
Original file line number Diff line number Diff line change
1
+ -- -
2
+ source : tests / solver .rs
3
+ expression : " solve_snapshot(provider, &[\" a 0..3\" , \" a 3..5\" ])"
4
+ -- -
5
+ The following packages are incompatible
6
+ | -- a >= 3 , < 5 can be installed with any of the following options :
7
+ | -- a 3 | 4
8
+ | -- a >= 0 , < 3 cannot be installed because there are no viable options :
9
+ | -- a 1 | 2 , which conflicts with the versions reported above .
10
+
Original file line number Diff line number Diff line change 1
1
-- -
2
2
source : tests / solver .rs
3
- assertion_line : 703
4
3
expression : error
5
4
-- -
6
5
The following packages are incompatible
7
6
| -- a * cannot be installed because there are no viable options :
8
- | -- a 2 would require
9
- | -- b * , which cannot be installed because there are no viable options :
10
- | -- b 2 would require
11
- | -- c >= 2 , < 3 , which cannot be installed because there are no viable options :
12
- | -- c 2 would constrain
13
- | -- a >= 3 , < 4 , which conflicts with any installable versions previously reported
14
- | -- b 1 would require
15
- | -- c >= 1 , < 2 , which cannot be installed because there are no viable options :
16
- | -- c 1 would constrain
17
- | -- a >= 3 , < 4 , which conflicts with any installable versions previously reported
18
- | -- a 1 would require
7
+ | -- a 1 | 2 would require
19
8
| -- b * , which cannot be installed because there are no viable options :
20
9
| -- b 2 would require
21
10
| -- c >= 2 , < 3 , which cannot be installed because there are no viable options :
Original file line number Diff line number Diff line change @@ -912,6 +912,17 @@ fn test_merge_excluded() {
912
912
insta:: assert_snapshot!( solve_snapshot( provider, & [ "a" ] ) ) ;
913
913
}
914
914
915
+ #[ test]
916
+ fn test_merge_installable ( ) {
917
+ let provider = BundleBoxProvider :: from_packages ( & [
918
+ ( "a" , 1 , vec ! [ ] ) ,
919
+ ( "a" , 2 , vec ! [ ] ) ,
920
+ ( "a" , 3 , vec ! [ ] ) ,
921
+ ( "a" , 4 , vec ! [ ] ) ,
922
+ ] ) ;
923
+ insta:: assert_snapshot!( solve_snapshot( provider, & [ "a 0..3" , "a 3..5" ] ) ) ;
924
+ }
925
+
915
926
#[ test]
916
927
fn test_root_excluded ( ) {
917
928
let mut provider = BundleBoxProvider :: from_packages ( & [ ( "a" , 1 , vec ! [ ] ) ] ) ;
You can’t perform that action at this time.
0 commit comments