question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatic Packages Get on Pubspec change not working if prompt to run "pub get" at startup is ignored

See original GitHub issue

Describe the bug Hello, I’ve recently encountered with this odd behavior in my project. I’m aware of the dart.runPubGetOnPubspecChanges setting, which is set to always. Trying it with a simpler project, it seems to work correctly. I would like to know what could be causing it to fail in the other project. Is there any way to show the logger messages with the Extension installed from the store? I can see in the implementation that there are several messages when an early return occurs. The automatic packages get behavior has been working fine for a long time in this project, so something must have changed recently on my end or on vscode.

To Reproduce Steps to reproduce the behavior:

  1. Edit pubspec.yaml
  2. Packages get is not run.

Expected behavior Packages get should run

Please complete the following information:

  • Operating System and version: Fedora 37
  • VS Code version: 1.74.1
  • Dart extension version: 3.55.20221130
  • Dart/Flutter SDK version: 3.55.20221129

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Dec 20, 2022

Ah, thanks! I see what’s happening. We set that flag as if we’re running pub around the notification that appears in the bottom corner. So if you don’t notice that notification (which VS code hides after ~10s), then it will be forever “locked” as already running, when in reality it didn’t start.

1reaction
DanTupcommented, Dec 18, 2022

The messages logged with logger.info in that class should show up in the extension log. If you trigger the fetch-on-save that isn’t working and then run the Dart: Open Extension Log command, hopefully you can find those logs in there, which might help understand why it was skipped.

Please let me know what you find!

Read more comments on GitHub >

github_iconTop Results From Across the Web

pubspec.yaml is not getting updated with flutter packages ...
I tried manually running flutter packages upgrade but that didn't serve any purpose. All the dependencies are still using their previous version ...
Read more >
"'pub get' has not been run" not resolving - Flutter
Just run it manually in the app/module package level terminal command flutter pub get. and this error will gone.
Read more >
build_runner | Dart Package
Ignore the no_leading_underscores_for_library_prefixes lint in the generated build script. Report changed assets when running as a deamon.
Read more >
Developing packages & plugins
How to write packages and plugins for Flutter.
Read more >
Settings - Dart & Flutter support for Visual Studio Code
This setting is intended for use by Dart Analysis Server developers. dart.autoImportCompletions#. Default: true . Whether to include symbols that have not been ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found