Skip to content

Running pub get from explicit save or the Get Packages button places result in different output #5917

Closed

Description

@FMorschel

Describe the bug
The Output tab displays different result tabs for package resolution when they should be the same.

To Reproduce
Steps to reproduce the behavior:

  1. Open a pub workspace
  2. Open a pubspec.yaml from an inner package/project
  3. Press Ctrl + S (see the Output is named after the pub workspace)
  4. Use the Get Packages button on the top right (see the Output is named after the current package)

Expected behavior
For it to always name it after the pub workspace.

Screenshots

Image

Note the package resolution from pub get is the same:

Image

Please complete the following information:

Workspace Environment
Dart Code extension: 3.129.20260202
Flutter extension: 3.129.20260202 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.109.5

Workspace type: Dart (LSP)
Workspace name: essential_lints

Dart (3.12.0-edge.70d1c47aae6443b2e1d890f6f34aa50c430b845b): C:\Users\felip_0vh5fa6\dart
Flutter (3.38.7): C:\Users\felip_0vh5fa6\.puro\envs\stable\flutter (No device)

Output from 'dart info'

C:\Users\felip_0vh5fa6\dart\bin\dart.exe info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.12.0-edge.70d1c47aae6443b2e1d890f6f34aa50c430b845b (main) (Tue Feb 17 09:46:10 2026 -0800) on "windows_x64"
  • on windows / "Windows 11 Pro" 10.0 (Build 26200)
  • locale is pt-BR

Project info

  • sdk constraint: '^3.10.0'
  • dependencies: analysis_server_plugin, analyzer, essential_lints_annotations, logging, meta
  • dev_dependencies: analyzer_testing, frontend_server_client, test, test_reflective_loader, very_good_analysis

Process info

Memory CPU Elapsed time Command line
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dartvm.exe
0 MB -- dartvm.exe

Activity

  1. DanTup commented on Mar 16, 2026

    @DanTup
    Member

    The reason for this is that the pubspec save goes through fetchPackagesOrPrompt which has logic that determines the correct place to run pub get as the workspace root, but the button directly executes pub.get which just operates exactly where it was told.

    We should better document some of these paths and then decide which options should go through which path (I'm not currently sure which is more correct, running it for the workspace, or the project - although the actual results from pub should be the same).

  2. added this to the v3.132.0 milestone on Mar 16, 2026
  3. added
    in editorRelates to code editing or language features
    in commandsRelates to commands (usually invoked from the command Palette)
    on Mar 16, 2026
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 commandsRelates to commands (usually invoked from the command Palette)in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions