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.

Bumping pubspec.yaml build number triggers pub get

See original GitHub issue

I have a build & deploy script that bumps the build number with this line

perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/$1.($2+1)/e' pubspec.yaml

However, when I do this, Dart-Code fetches packages from pub right as the script begins the build/compile stage.

  1. Are there any issues with pub get running simultaneously with flutter build ?
  2. Is there any way to suppress auto pub get temporarily in a shell script?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Feb 6, 2020

If it’s just one project, you could disable runPubGetOnPubspecChanges for that one project (using “Workspace Settings” that would be saved at ./.vscode/settings.json). Otherwise, I don’t think there’s really a clean way to fix this without starting to parse pubspec (but I’d prefer not to just for this case).

1reaction
DanTupcommented, Feb 3, 2020

Does it ever complete? My guess here is that your shell script is hitting the flutter build before the command kicked off by VS Code has spawned Flutter to aquire a lock. I would expect that once your flutter build (in the shell script) completes, it would release the lock and then the VS Code process would complete. Does that happen?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conflicting ffi version between packages & failed to get ...
I try to get the pubspec.yaml of tflite_flutter (https://pub.dev/packages/tflite_flutter) and it seems to be conflicting with file_picker (https ...
Read more >
pubspec_version - Dart API docs
CLI tool to set/bump the version key in pubspec.yaml. Semver-compliant (Almost. It uses pub_semver which is a bit different.) ...
Read more >
Automated Releases - Melos
Automated Releases. Melos is able to automate versioning and publishing of your packages. This includes: incrementing of versions based on commit messages.
Read more >
v2.7 - Dart Code - Dart & Flutter support for Visual Studio Code
This version contains no functional changes but updates some internal references ... Saving pubspec.yaml in a Flutter project will no longer run pub...
Read more >
Howto setup Gitlab CI/CD for developing and publishing a ...
After that we need to run flutter pub get and we will notice the ... When they do, they need to bump the...
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