Running dart pub outdated --mode=null-safety on my project says that all packages fully support null safety, but dart migratedisplays a warning.
dart --version
Dart SDK version: 2.12.0-edge.bf968d56270185ffd7b2600288e56f82c5bbe09d (be) (Fri Oct 30 20:59:22 2020 +0000) on "macos_x64"
name: null_safety_migration_messages
description: A starting point for Dart libraries or applications.
environment:
sdk: '>=2.12.0 <3.0.0'
dev_dependencies:
test: '>=1.15.4 <2.0.0'
pedantic: ">=1.9.2 <2.0.0"
coverage: ">=0.13.11 <0.14.0"
Run dart pub outdated --mode=null-safety
dart pub outdated --mode=null-safety
Running in 'null safety' mode.
Showing packages where the current version doesn't fully support null safety.
Dependencies Current Upgradable Resolvable Latest
all fully support null safety
dev_dependencies
coverage 0.14.1 - - 0.14.1
pedantic 1.9.2 - - 1.9.2
test 1.15.4 - - 1.15.4
transitive dependencies: all fully support null safety
transitive dev_dependencies
_fe_analyzer_shared 12.0.0 - - 12.0.0
analyzer 0.40.5 - - 0.40.5
args 1.6.0 - - 1.6.0
async 2.4.2 - - 2.4.2
boolean_selector 2.0.0 - - 2.0.0
charcode 1.1.3 - - 1.1.3
cli_util 0.2.0 - - 0.2.0
collection 1.14.13 - - 1.14.13
convert 2.1.1 - - 2.1.1
crypto 2.1.5 - - 2.1.5
glob 1.2.0 - - 1.2.0
http 0.12.2 - - 0.12.2
http_multi_server 2.2.0 - - 2.2.0
http_parser 3.1.4 - - 3.1.4
io 0.3.4 - - 0.3.4
js 0.6.2 - - 0.6.2
logging 0.11.4 - - 0.11.4
matcher 0.12.9 - - 0.12.9
meta 1.2.3 - - 1.2.3
mime 0.9.7 - - 0.9.7
node_interop 1.2.0 - - 1.2.0
node_io 1.1.1 - - 1.1.1
node_preamble 1.4.12 - - 1.4.12
package_config 1.9.3 - - 1.9.3
path 1.7.0 - - 1.7.0
pool 1.4.0 - - 1.4.0
pub_semver 1.4.4 - - 1.4.4
shelf 0.7.9 - - 0.7.9
shelf_packages_handler 2.0.0 - - 2.0.0
shelf_static 0.2.8 - - 0.2.8
shelf_web_socket 0.2.3 - - 0.2.3
source_map_stack_trace 2.0.0 - - 2.0.0
source_maps 0.10.9 - - 0.10.9
source_span 1.7.0 - - 1.7.0
stack_trace 1.9.5 - - 1.9.5
stream_channel 2.0.0 - - 2.0.0
string_scanner 1.0.5 - - 1.0.5
term_glyph 1.1.0 - - 1.1.0
test_api 0.2.18 - - 0.2.18
test_core 0.3.11+1 - - 0.3.11+1
typed_data 1.2.0 - - 1.2.0
vm_service 4.2.0 - - 5.4.0
watcher 0.9.7+15 - - 0.9.7+15
web_socket_channel 1.1.0 - - 1.1.0
webkit_inspection_protocol 0.7.3 - - 0.7.3
yaml 2.2.1 - - 2.2.1
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
This is confusion about the output.
You _dependencies_ "all fully support null safety", because there are none, however your _dev_dependencies_ and _transitive dev_dependencies_ don't support null safety.
The message is "transitive dependencies: all fully support null safety" - I think this should be "transitive dependencies: not all fully support null safety" or something similar.
I'm misreading - this can be closed.
One idea might be to change the - to <no version available> or X. But I don't think this is a bug.
@jonasfj @mit-mit
I think there is a real UX issue here. Reading that output.... I was confused too. Here's what I see in the above:
Showing packages where the current version doesn't fully support null safety.
Actually, no. It's showing me a bunch of packages, some of which support null safety, some of which don't. Maybe something like "Showing null safety status of your transitive dependencies" would be better?
Dependencies Current Upgradable Resolvable Latest
all fully support null safety
This is confusing. It's not obvious that this is showing an empty list, and noting that all of the (non-existent) dependencies support null safety. It's easy to miss the distinction between dependencies and dev dependencies here. Maybe special case empty dependencies and just say "None"?
coverage 0.14.1 - - 0.14.1
pedantic 1.9.2 - - 1.9.2
test 1.15.4 - - 1.15.4
transitive dependencies: all fully support null safety
transitive dev_dependencies
At this point, I'm a little lost (as a reader). What is this showing me?
I wonder whether we could put a summary at the top to give the user a map to read this by? That is, start with a header at the top that says something like:
All 0 of 0 direct dependencies support null safety.
All k of k indirect dependencies support null safety.
All m of m direct dev dependencies support null safety.
Only j of n transitive dev dependencies support null safety.
Then you list out the details in something like the format above, and it's much clearer because I have a top level map of what I'm looking for. WDYT?
I wonder whether we could put a summary at the top to give the user a map to read this by?
So something like, perhaps?
$ dart pub outdated --mode=null-safety
Running in 'null safety' mode.
Showing packages where the current version doesn't fully support null safety.
dependencies: 0 of 0 support null safety.
dev_dependencies: 0 of 3 support null safety.
transitive dependencies: 0 of 0 support null safety.
transitive dev_dependencies: 3 of 15 support null safety.
Package Name Current Upgradable Resolvable Latest
direct dependencies: 0 of 0 support null safety.
dev_dependencies:
coverage 0.14.1 - - 0.14.1
pedantic 1.9.2 - - 1.9.2
test 1.15.4 - - 1.15.4
transitive dependencies: 0 of 0 support null safety.
transitive dev_dependencies:
_fe_analyzer_shared 12.0.0 - - 12.0.0
analyzer 0.40.5 - - 0.40.5
args 1.6.0 - - 1.6.0
async 2.4.2 - - 2.4.2
boolean_selector 2.0.0 - - 2.0.0
charcode 1.1.3 - - 1.1.3
...
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
Hmm, it's possible that we need to break into 4 separate tables...
Yeah, that helps a lot. I wonder if it would also be worth putting a one sentence summary that's one of:
WDYT?
@leafpetersen We might want to have some further discussion about whether we can more narrowly target _imported_ code before we put effort towards changes here. As it stands even with the proposed solution _fe_analyzer_shared and analyzer are always going to show up as a blocker even though the _vast_ majority of projects don't transitively import it.
Tagging as a null safety beta experience blocker
Status update: Meeting scheduled for 11am Wed (pacific time) to discuss.
One change I think we need to make to improve the usefulness of outdated: have --mode=null-safety automatically set --prereleases. I think we'll need this not just during beta, but also for at least some months past stable launch.
Here's the current output for an app that depends on just characters: ^1.0.0 (characters just had a 2.12 version published):
$ dart pub outdated --mode=null-safety --prereleases --no-color
Running in 'null safety' mode.
Showing packages where the current version doesn't fully support null safety.
Dependencies Current Upgradable Resolvable Latest
characters โ1.0.0 โ1.0.0 โ1.0.0 โ1.1.0-nullsafety.5
dev_dependencies: all fully support null safety
transitive dependencies: all fully support null safety
transitive dev_dependencies: all fully support null safety
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
Some ideas for improving this:
Change:
Running in 'null safety' mode.
Showing packages where the current version doesn't fully support null safety.
to:
Running in 'null safety' mode.
โ indicates versions without null safety support.
โ indicates versions with null safety support.
It's not clear what this means:
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
I think it means something like:
To update to null safety versions listed with an โ indication in the Latest column,
you need to manually edit pubspec.yaml to allow those versions.
$ dart pub outdated --mode=null-safety
Running in 'null safety' mode.
โ indicates versions without null safety support.
โ indicates versions with null safety support.
Package Name Current Upgradable Resolvable Latest
direct dependencies: 0 of 0 support null safety.
dev_dependencies:
coverage โ0.14.1 - - โ0.14.1
pedantic โ1.9.2 - - โ1.9.2
test โ1.15.4 - - โ1.15.4
transitive dependencies: 0 of 0 support null safety.
transitive dev_dependencies:
_fe_analyzer_shared โ12.0.0 - - โ12.0.0
analyzer โ0.40.5 - - โ0.40.5
args โ1.6.0 - - โ1.6.0
async โ2.4.2 - - โ2.4.2
boolean_selector โ2.0.0 - - โ2.0.0
charcode โ1.1.3 - - โ1.1.3
...
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.
The last two lines: says that, in this case, this particular run of pub outdated --mode=null-safety, you already have all of the latest resolvable versions.
That is, if you want the versions in the latest column, you'll probably have to remove one of your dependencies, because we have found the latest versions of your dependencies to be not mutually compatible.
I think we should keep this line, although if you have a better way to explain I think we are all ears :D
(This line also exists in output from pub outdated when you have mutually incompatible latest versions... we we have tried to improve it before, but the scenario is complicate)
I think we should keep this line, although if you have a better way to explain I think we are all ears :D
How about:
"No upgrades can be made. While newer versions of some packages are available, they are not compatible with one or more of your current dependencies."
@leafpetersen I took a stab at improving this based on your input in https://github.com/dart-lang/pub/pull/2729