|
2 | 2 | // for details. All rights reserved. Use of this source code is governed by a
|
3 | 3 | // BSD-style license that can be found in the LICENSE file.
|
4 | 4 |
|
5 |
| -import 'package:pub_semver/pub_semver.dart'; |
6 |
| - |
7 | 5 | import '../package_name.dart';
|
8 | 6 | import 'incompatibility_cause.dart';
|
9 | 7 | import 'term.dart';
|
@@ -108,15 +106,6 @@ class Incompatibility {
|
108 | 106 |
|
109 | 107 | return '${_terse(depender, details, allowEvery: true)} depends on '
|
110 | 108 | '${_terse(dependee, details)}';
|
111 |
| - } else if (cause == IncompatibilityCause.useLatest) { |
112 |
| - assert(terms.length == 1); |
113 |
| - |
114 |
| - var forbidden = terms.last; |
115 |
| - assert(forbidden.isPositive); |
116 |
| - |
117 |
| - return 'the latest version of ${_terseRef(forbidden, details)} ' |
118 |
| - '(${VersionConstraint.any.difference(forbidden.constraint)}) ' |
119 |
| - 'is required'; |
120 | 109 | } else if (cause is SdkCause) {
|
121 | 110 | assert(terms.length == 1);
|
122 | 111 | assert(terms.first.isPositive);
|
@@ -429,11 +418,7 @@ class Incompatibility {
|
429 | 418 | buffer.write('${_terse(latter.terms.first, details)} ');
|
430 | 419 | if (priorLine != null) buffer.write('($priorLine) ');
|
431 | 420 |
|
432 |
| - if (latter.cause == IncompatibilityCause.useLatest) { |
433 |
| - var latest = |
434 |
| - VersionConstraint.any.difference(latter.terms.single.constraint); |
435 |
| - buffer.write('but the latest version ($latest) is required'); |
436 |
| - } else if (latter.cause is SdkCause) { |
| 421 | + if (latter.cause is SdkCause) { |
437 | 422 | var cause = latter.cause as SdkCause;
|
438 | 423 | if (cause.noNullSafetyCause) {
|
439 | 424 | buffer.write('which doesn\'t support null safety');
|
|
0 commit comments