Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for command line that shows packages that create dependency constraints incompatible with newer package #148671

Closed
stephane-archer opened this issue May 20, 2024 · 4 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter r: invalid Issue is closed as not valid team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@stephane-archer
Copy link

Use case

When updating packages the suggested command doesn't make sense and results in a bad developer experience.

flutter pub upgrade --major-versions
Resolving dependencies... (2.6s)
Downloading packages...
  leak_tracker 10.0.4 (10.0.5 available)
  leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.12.0 (1.15.0 available)
  test_api 0.7.0 (0.7.1 available)
  vm_service 14.2.1 (14.2.2 available)
No dependencies changed.
6 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

No changes to pubspec.yaml!
❯ flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.
all dependencies are up-to-date.

Proposal

The suggested command should highlight packages that create outdated dependency constraints:

6 packages have newer versions incompatible with dependency constraints.

What package is responsible for that?

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 21, 2024
@darshankawar
Copy link
Member

@stephane-archer
Can you check if your case resembles this or not ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 21, 2024
@stephane-archer
Copy link
Author

@darshankawar This is not about showing discontinued packages, it's about recommending a command line that shows packages that create dependency constraints incompatible with newer package

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 21, 2024
@darshankawar darshankawar added c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. c: proposal A detailed proposal for a change to Flutter team-tool Owned by Flutter Tool team labels May 21, 2024
@darshankawar darshankawar changed the title When updating packages the suggested command doesn't make sense and results in a bad developer experience. Proposal for command line that shows packages that create dependency constraints incompatible with newer package May 21, 2024
@danagbemava-nc danagbemava-nc removed the in triage Presently being triaged by the triage team label May 21, 2024
@gnprice
Copy link
Member

gnprice commented May 21, 2024

Here's the issue for this feature request in the pub tracker:

I agree it would be a useful feature. There's also a tip at dart-lang/pub#3545 (comment) about how you can get that information today (add a newer version in pubspec.yaml and rerun flutter pub get).


Meanwhile the reason flutter pub outdated doesn't say much is that the affected dependencies are indirect dependencies (which after all is why they weren't upgraded). You can find more with flutter pub outdated --transitive.

Coincidentally there's an issue just yesterday about that:

Even with --transitive the information printed doesn't answer your original question, though.


In this specific example, I think the answer to "what package is responsible for that" is Flutter itself — those all look like packages that the Flutter SDK pins versions of. So the way to upgrade them is to upgrade to the latest Flutter from main.

@andrewkolos
Copy link
Contributor

andrewkolos commented May 23, 2024

Hello and thanks for contributing this issue. I was going to say that this should instead be tracked in the pub repo, but it looks like that's already the case (thanks for the fantastic research @gnprice). Because of this, I'll be closing this issue now. Please reopen if I misunderstood.

@andrewkolos andrewkolos closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
@darshankawar darshankawar added the r: invalid Issue is closed as not valid label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter r: invalid Issue is closed as not valid team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

5 participants