dart-lang / pub

The pub command line tool
https://dart.dev/tools/pub/cmd
BSD 3-Clause "New" or "Revised" License
1.04k stars 229 forks source link

outdated reports incorrect number of upgradable dependencies #2596

Closed awhitford closed 4 years ago

awhitford commented 4 years ago

Environment

Problem

flutter pub outdated says that there are 4 upgradable dependencies, but I only count 3:

Dependencies  Current               Upgradable            Resolvable            Latest  
pedantic      *1.9.0                *1.9.0                *1.9.0                1.9.2   
rxdart        *0.24.1 (overridden)  *0.24.1 (overridden)  *0.24.1 (overridden)  0.24.1  

dev_dependencies: all up-to-date

transitive dependencies
basic_utils   *2.6.0                2.6.1                 2.6.1                 2.6.1   
crypto        *2.1.4                2.1.5                 2.1.5                 2.1.5   
image         *2.1.12               2.1.14                2.1.14                2.1.14  
matcher       *0.12.8               *0.12.8               *0.12.8               0.12.9  
meta          *1.1.8                *1.1.8                *1.1.8                1.2.2   
petitparser   *3.0.4                *3.0.4                *3.0.4                3.1.0   
xml           *3.7.0                *4.2.0                *4.2.0                4.3.0   

transitive dev_dependencies
cli_util      *0.1.4                *0.1.4                *0.1.4                0.2.0   
test_api      *0.2.17               *0.2.17               *0.2.17               0.2.18  

4 upgradable dependencies are locked (in pubspec.lock) to older versions.
To update these dependencies, use `pub upgrade`.
dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  animated_text_kit: ^2.2.0
  apple_sign_in: ^0.1.0
  badges: ^1.1.1
  bubble: ^1.1.9+1
  cloud_firestore: ^0.13.7
  cloud_functions: ^0.5.0
  device_info: ">=0.4.2+4 <2.0.0"
  firebase_analytics: ^5.0.16
  firebase_auth: ^0.16.1
  firebase_image: ^0.1.6
  firebase_messaging: ^6.0.16
  firebase_remote_config: ^0.3.1
  firebase_storage: ^3.1.6
  firebase_user_stream: ^1.0.0
  flutter_blurhash: ^0.5.0
  flutter_form_builder: ^3.12.3
  flutter_markdown: ^0.4.3
  flutter_signin_button: ^1.0.0
  flutter_slidable: ^0.5.5
  flutter_vector_icons: ^0.2.1
  flutter_webview_plugin: ^0.3.11
  geoflutterfire: ^2.1.0
  google_fonts: ^1.1.0
  google_maps_flutter: ^0.5.29
  google_maps_webservice: ^0.0.17
  google_sign_in: ^4.5.1
  http: ^0.12.2
  image_cropper: ^1.2.3
  image_picker: ^0.6.7+4
  intl: ^0.16.1
  location: ^3.0.2
  oauth1: ^1.0.5
  package_info: ">=0.4.1 <2.0.0"
  pedantic: ^1.9.0
  provider: ^4.3.1
  pub_semver: ^1.4.4
  quiver: ^2.1.3
  rxdart: ^0.24.1
  url_launcher: ^5.5.0
  uuid: ^2.2.0

dependency_overrides:
  # Temporary until geoflutterfire is upgraded
  rxdart: ^0.24.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  intl_translation: ^0.17.10

Expected behavior

Actual behavior

The count should have been 3, not 4. After I did a flutter pub upgrade, I saw 3 updated:

Dependencies  Current               Upgradable            Resolvable            Latest  
pedantic      *1.9.0                *1.9.0                *1.9.0                1.9.2   
rxdart        *0.24.1 (overridden)  *0.24.1 (overridden)  *0.24.1 (overridden)  0.24.1  

dev_dependencies: all up-to-date

transitive dependencies
matcher       *0.12.8               *0.12.8               *0.12.8               0.12.9  
meta          *1.1.8                *1.1.8                *1.1.8                1.2.2   
petitparser   *3.0.4                *3.0.4                *3.0.4                3.1.0   
xml           *4.2.0                *4.2.0                *4.2.0                4.3.0   

transitive dev_dependencies
cli_util      *0.1.4                *0.1.4                *0.1.4                0.2.0   
test_api      *0.2.17               *0.2.17               *0.2.17               0.2.18  

Dependencies are all constrained to the latest resolvable versions.
Newer versions, while available, are not mutually compatible.

--trace output

[ +102 ms] executing: [/Users/anthony/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +38 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 840c9205b344a59e48a5926ee2d791cc5640924c
[        ] executing: [/Users/anthony/flutter/] git tag --contains HEAD
[  +28 ms] Exit code 0 from: git tag --contains HEAD
[        ] 1.20.0
[   +9 ms] executing: [/Users/anthony/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/anthony/flutter/] git ls-remote --get-url origin
[   +9 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +55 ms] executing: [/Users/anthony/flutter/] git rev-parse --abbrev-ref HEAD
[  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +5 ms] executing: sw_vers -productName
[  +15 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +15 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.6
[        ] executing: sw_vers -buildVersion
[  +15 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19G73
[  +35 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +5 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[  +26 ms] Using /Users/anthony/flutter/.pub-cache for the pub cache.
[        ] executing: /Users/anthony/flutter/bin/cache/dart-sdk/bin/pub outdated
Dependencies  Current               Upgradable            Resolvable            Latest  
pedantic      *1.9.0                *1.9.0                *1.9.0                1.9.2   
rxdart        *0.24.1 (overridden)  *0.24.1 (overridden)  *0.24.1 (overridden)  0.24.1  

dev_dependencies: all up-to-date

transitive dependencies
basic_utils   *2.6.0                2.6.1                 2.6.1                 2.6.1   
crypto        *2.1.4                2.1.5                 2.1.5                 2.1.5   
image         *2.1.12               2.1.14                2.1.14                2.1.14  
matcher       *0.12.8               *0.12.8               *0.12.8               0.12.9  
meta          *1.1.8                *1.1.8                *1.1.8                1.2.2   
petitparser   *3.0.4                *3.0.4                *3.0.4                3.1.0   
xml           *3.7.0                *4.2.0                *4.2.0                4.3.0   

transitive dev_dependencies
cli_util      *0.1.4                *0.1.4                *0.1.4                0.2.0   
test_api      *0.2.17               *0.2.17               *0.2.17               0.2.18  

4 upgradable dependencies are locked (in pubspec.lock) to older versions.
To update these dependencies, use `pub upgrade`.
[+3387 ms] "flutter outdated" took 3,438ms.
[ +249 ms] ensureAnalyticsSent: 244ms
[   +2 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0

Is it counting the adjustment to the sdk? (Because I do see that changing after upgrade.)

pubspec.zip

sigurdm commented 4 years ago

Hmm I think it is correct.

These four lines have a difference between the currant and the upgradable row:

basic_utils   *2.6.0                2.6.1                 2.6.1                 2.6.1   
crypto        *2.1.4                2.1.5                 2.1.5                 2.1.5   
image         *2.1.12               2.1.14                2.1.14                2.1.14  
xml           *3.7.0                *4.2.0                *4.2.0                4.3.0   

I guess the output is a bit hard to read... not sure how to improve it though....

sigurdm commented 4 years ago

I'll close this issue as "working as intended" Please reopen if you still think there is an issue.