Skip to content

Dependencies tree doesn't show any nodes if the packages name in pubspec.yaml does not match the folders name #5307

Closed

Description

@doreille

Describe the bug
On some flutter projects with many dependencies, the dependencies panel is completely empty (no
On the same Linux account, some other flutter projects have a working dependencies panel.

To Reproduce
Steps to reproduce the behavior:
This is reproducible on my account.

  1. git clone https://github.com/minaxorg/flutter_intro.git
  2. cd flutter_intro/example/
  3. flutter pub get
  4. code .
  5. open the "DEPENDENCIES" panel

Expected behavior
The VScode primary side bar dependencies panel must contains

  • direct dependencies
  • dev dependencies
  • transitive dependencies

Screenshots
image

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version:
    Linux Fedora 40
  • VS Code version:
    1.94.1 (rpm -q code: code-1.94.1-1728111464.el8.x86_64)
  • Dart extension version:
    Dart Code extension: 3.98.1
    Flutter extension: 3.98.0 (activated)
  • Dart/Flutter SDK version:
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.24.3, on Fedora Linux 40 (Workstation Edition) 6.10.11-200.fc40.x86_64, locale en_GB.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    [✓] Chrome - develop for the web
    [✓] Linux toolchain - develop for Linux desktop
    [!] Android Studio (not installed)
    [✓] VS Code (version 1.94.1)
    [✓] Connected device (2 available)
    [✓] Network resources
    ! Doctor found issues in 1 category.
  • Target device (if the issue relates to Flutter debugging):

Activity

  1. DanTup commented on Oct 10, 2024

    @DanTup
    Member

    Thanks, I can repro this. The issue is that the project name does not match the name of the folder it's in (example vs intro). There are some assumptions about these matching in the code that maybe we can get rid of.

  2. changed the title [-]VScode primary side bar dependencies panel empty[/-] [+]Dependencies tree doesn't show any nodes if the packages name in pubspec.yaml does not match the folders name[/+] on Oct 10, 2024
  3. added this to the v3.100.0 milestone on Oct 10, 2024
  4. added
    in viewsRelates to custom views, like the Test tree or Dependencies tree
    on Oct 10, 2024
  5. doreille commented on Oct 10, 2024

    @doreille
    Author

    Thanks, it works now after renaming the project. I searched for a long time why it didn't work anymore but I understand now because I had renamed this project.

  6. DanTup commented on Oct 10, 2024

    @DanTup
    Member

    It's also very possible this became broken in the recent release - the way that we get these dependencies changed slightly recently to support the upcoming Pub Workspaces feature. Before those changes, probably this would've worked fine too.

    I've fixed the issue now anyway, so from the next release it will work even if the names don't match. Thank you for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in viewsRelates to custom views, like the Test tree or Dependencies treeis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions