Skip to content

Saving pubspec.yaml does not run analysis server and unable to import new package. #3440

@2shrestha22

Description

@2shrestha22

Describe the bug
After adding a package in pubspec.yaml and saving the file analysis server do not analyze changes and we can not import newly added package.

To Reproduce
Steps to reproduce the behavior:

  1. Add new package in pubspec.yaml
  2. Save the file with ctrl+s
  3. It will download the library but does not load new files/packages so we need to manually restart analysis server or restart vs code.

Expected behavior
After saving and downloading package we should be able to import newly added package without needing to restart vs code or analysis server.

Screenshots
I will provide if needed.

Versions (please complete the following information):

  • VS Code:
    Commit: 054a9295330880ed74ceaedda236253b4f39a335
    Date: 2021-06-18T02:30:22.835Z 
    Electron: 12.0.12
    Chrome: 89.0.4389.128
    Node.js: 14.16.0
    V8: 8.9.255.25-electron.0
    OS: Linux x64 5.12.13-arch1-2
  • Flutter:
[✓] Flutter (Channel stable, 2.2.2, on Linux, locale en_US.UTF-8)
   • Flutter version 2.2.2 at /opt/flutter
   • Framework revision d79295af24 (3 weeks ago), 2021-06-11 08:56:01 -0700
   • Engine revision 91c9fc8fe0
   • Dart version 2.13.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
   • Android SDK at /home/hatman/Android/Sdk
   • Platform android-30, build-tools 30.0.3
   • Java binary at: /opt/android-studio/jre/bin/java
   • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
   • All Android licenses accepted.

[✓] Chrome - develop for the web
   • CHROME_EXECUTABLE = /usr/bin/google-chrome-stable

[✓] Android Studio (version 4.1)
   • Android Studio at /opt/android-studio
   • Flutter plugin version 57.0.2
   • Dart plugin version 202.8531
   • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
   • POCO F1 (mobile) • c7ca2666 • android-arm64  • Android 11 (API 30)
   • Chrome (web)     • chrome   • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions