Question to Flutter Community :)
As the question suggests pubspec.lock not updating the current reference of the branch
for example, if I add the below dependency to puspec.yaml like
my_repository:
git:
url: https://github.com/jitesh/my_repository.git
ref: develop
This change my pubspec.lock to
my_repository:
dependency: "direct main"
description:
path: "."
ref: develop
resolved-ref: "commit id 1"
url: "https://github.com/jitesh/my_repository.git"
This seems correct as we get the latest commit, if we added dependency for the first time in puspec.yaml, but if someone pushed some changes to my_repository.git on develop branch, and you want those changes, its not getting even after doing pub get, and giving the same result as
my_repository:
dependency: "direct main"
description:
path: "."
ref: develop
resolved-ref: "commit id 1"
url: "https://github.com/jitesh/my_repository.git"
Ideally, it should change resolved-ref to resolved-ref: "commit id 2" as the latest commits are pushed to develop branch.
The hack, I follow is to upgrade pubspec.lock manually with the latest commit, also I read somewhere that flutter upgrade also does get the latest commits, but it seems to longer process to me to just get one repository commit.
What are the standard practices you guys follow?