Improve message in `pub outdated` when incompatible versions are found (#2746)
diff --git a/lib/src/command/outdated.dart b/lib/src/command/outdated.dart
index f033036..b0b5f61 100644
--- a/lib/src/command/outdated.dart
+++ b/lib/src/command/outdated.dart
@@ -561,9 +561,8 @@
upgradable == 0 &&
rows.isNotEmpty) {
log.message(
- '\nCurrent dependencies are constrained to versions listed in Resolvable.'
- '\nA resolution compatible with the Latest versions doesn\'t exist, as they are not'
- '\nmutually compatible.');
+ "You are already using the newest resolvable versions listed in the 'Resolvable' column.\n"
+ "Newer versions, listed in 'Latest', may not be mutually compatible.");
}
if (notAtResolvable != 0) {
diff --git a/test/outdated/goldens/dependency_overrides.txt b/test/outdated/goldens/dependency_overrides.txt
index 82a807f..16acdc9 100644
--- a/test/outdated/goldens/dependency_overrides.txt
+++ b/test/outdated/goldens/dependency_overrides.txt
@@ -68,10 +68,8 @@
bar *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
baz *2.0.0 (overridden) *2.0.0 (overridden) *2.0.0 (overridden) 2.0.0
foo *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-transitive
Showing outdated packages.
@@ -83,10 +81,8 @@
bar *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
baz *2.0.0 (overridden) *2.0.0 (overridden) *2.0.0 (overridden) 2.0.0
foo *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --up-to-date
Showing outdated packages.
@@ -98,10 +94,8 @@
bar *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
baz *2.0.0 (overridden) *2.0.0 (overridden) *2.0.0 (overridden) 2.0.0
foo *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --prereleases
Showing outdated packages.
@@ -113,10 +107,8 @@
bar *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
baz *2.0.0 (overridden) *2.0.0 (overridden) *2.0.0 (overridden) 2.0.0
foo *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dev-dependencies
Showing outdated packages.
@@ -128,10 +120,8 @@
bar *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
baz *2.0.0 (overridden) *2.0.0 (overridden) *2.0.0 (overridden) 2.0.0
foo *1.0.1 (overridden) *1.0.1 (overridden) *1.0.1 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dependency-overrides
Showing outdated packages.
@@ -161,10 +151,8 @@
bar ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
baz ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0
foo ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --transitive
Showing dependencies that are currently not opted in to null-safety.
@@ -177,10 +165,8 @@
bar ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
baz ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0
foo ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --no-prereleases
Showing dependencies that are currently not opted in to null-safety.
@@ -193,10 +179,8 @@
bar ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
baz ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0 (overridden) ✗2.0.0
foo ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗1.0.1 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --json --mode=null-safety
{
diff --git a/test/outdated/goldens/dependency_overrides_no_solution.txt b/test/outdated/goldens/dependency_overrides_no_solution.txt
index c62e74f..4e04886 100644
--- a/test/outdated/goldens/dependency_overrides_no_solution.txt
+++ b/test/outdated/goldens/dependency_overrides_no_solution.txt
@@ -49,10 +49,8 @@
direct dependencies:
bar *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
foo *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-transitive
Showing outdated packages.
@@ -63,10 +61,8 @@
direct dependencies:
bar *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
foo *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --up-to-date
Showing outdated packages.
@@ -77,10 +73,8 @@
direct dependencies:
bar *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
foo *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --prereleases
Showing outdated packages.
@@ -91,10 +85,8 @@
direct dependencies:
bar *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
foo *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dev-dependencies
Showing outdated packages.
@@ -105,10 +97,8 @@
direct dependencies:
bar *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
foo *1.0.0 (overridden) *1.0.0 (overridden) *1.0.0 (overridden) 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dependency-overrides
Showing outdated packages.
@@ -119,10 +109,8 @@
direct dependencies:
bar *1.0.0 (overridden) - - 2.0.0
foo *1.0.0 (overridden) - - 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety
Showing dependencies that are currently not opted in to null-safety.
@@ -134,10 +122,8 @@
direct dependencies:
bar ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
foo ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --transitive
Showing dependencies that are currently not opted in to null-safety.
@@ -149,10 +135,8 @@
direct dependencies:
bar ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
foo ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --no-prereleases
Showing dependencies that are currently not opted in to null-safety.
@@ -164,10 +148,8 @@
direct dependencies:
bar ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
foo ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗1.0.0 (overridden) ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --json --mode=null-safety
{
diff --git a/test/outdated/goldens/mutually_incompatible.txt b/test/outdated/goldens/mutually_incompatible.txt
index a6109b5..ae40331 100644
--- a/test/outdated/goldens/mutually_incompatible.txt
+++ b/test/outdated/goldens/mutually_incompatible.txt
@@ -43,10 +43,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-transitive
Showing outdated packages.
@@ -57,10 +55,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --up-to-date
Showing outdated packages.
@@ -71,10 +67,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --prereleases
Showing outdated packages.
@@ -85,10 +79,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dev-dependencies
Showing outdated packages.
@@ -99,10 +91,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --no-dependency-overrides
Showing outdated packages.
@@ -113,10 +103,8 @@
direct dependencies:
bar *1.0.0 *1.0.0 *1.0.0 2.0.0
foo *1.0.0 *1.0.0 *1.0.0 2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety
Showing dependencies that are currently not opted in to null-safety.
@@ -128,10 +116,8 @@
direct dependencies:
bar ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
foo ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --transitive
Showing dependencies that are currently not opted in to null-safety.
@@ -143,10 +129,8 @@
direct dependencies:
bar ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
foo ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --no-color --mode=null-safety --no-prereleases
Showing dependencies that are currently not opted in to null-safety.
@@ -158,10 +142,8 @@
direct dependencies:
bar ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
foo ✗1.0.0 ✗1.0.0 ✗1.0.0 ✗2.0.0
-
-Current dependencies are constrained to versions listed in Resolvable.
-A resolution compatible with the Latest versions doesn't exist, as they are not
-mutually compatible.
+You are already using the newest resolvable versions listed in the 'Resolvable' column.
+Newer versions, listed in 'Latest', may not be mutually compatible.
$ pub outdated --json --mode=null-safety
{