8000 A way to get the solve failure for updating a transitive dependency to latest/resolvable · Issue #4569 · dart-lang/pub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
A way to get the solve failure for updating a transitive dependency to latest/resolvable #4569
Open
@sigurdm

Description

@sigurdm

We have upgrade that upgrades to the latest upgradable version, and upgrade --major-versions that upgrade to the latest "resolvable" version.

We have outdated that explains what the upgradable, resolvable and latest versions are.

But we have no real way of getting an explanation of why you cannot get the latest version (which other packages are holding you back).

example:

> flutter pub upgrade --major-versions
Resolving dependencies... 
No changes to pubspec.yaml!
Resolving dependencies... 
Downloading packages... 
  lints 5.1.1 (6.0.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  vector_math 2.1.4 (2.1.5 available) # <-- why can't we get this???
No dependencies changed.
3 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information. # <-- doesn't really tell me why

A workaround is to run:

> flutter pub add vector_math:2.1.5
Note: vector_math is pinned to version 2.1.4 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because every version of flutter_test from sdk depends on vector_math 2.1.4 and ai_blah depends on vector_math 2.1.5, flutter_test from
  sdk is forbidden.
So, because ai_blah depends on flutter_test from sdk, version solving failed.
Failed to update packages.

I propose we create some kind of pub explain <package> command

Which would lock the given package to latest and run a version-resolution, and displaying the solve-trace.

Perhaps we could retrofit this into the existing upgrade commmand:

> dart pub upgrade vector_math:latest # locks to the latest version
> dart pub upgrade vector_math:resolvable # locks to the "resolvable" version

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0