Reputation: 3172
It's a Flutter project, with some GIT repo dependencies. One of them has changed:
pubspec.yaml
before:
magicmodule:
url: https://github.com/wrongrepo/magicmodule
path: magicmodule
ref: b83b8de832749a30037487c12a33ff3297329830
pubspec.yaml
after:
magicmodule:
url: https://github.com/goodrepo/magicmodule
path: magicmodule
ref: 76f876fc9dc7678a8763ca876876af733b3b3c7
But somehow Flutter wants to access the old repo:
$ flutter pub get
Resolving dependencies... (3.4s)
Git error. Command: `git clone --mirror https://github.com/wrongrepo/magicmodule /Users/ern0/.pub-cache/_temp/dir6jK0GP`
stdout:
stderr: Cloning into bare repository '/Users/ern0/.pub-cache/_temp/dir6jK0GP'...
remote: Repository not found.
fatal: repository 'https://github.com/wrongrepo/magicmodule' not found
What I've tried:
flutter pub cache clean
pubspec.lock
, removed the dependency by handflutter pub cache rebuild
flutter pub cache repair
flutter pub get
(no error), cleared/rebuilt cache, added back, still looking for wrongrepo
I've grep
-ped both the project and the cache directory for "wrongrepo", not found, but Flutter still want to use it.
My suspect is that Flutter is using not the pubspec.yaml
from the filesystem, but from an older commit of the main repository, but maybe I'm wrong. Also, I've committed (and pushed) the change of pubspec.yaml
in the main repo.
I am new to Flutter, it must be some trivial mistake.
Upvotes: 0
Views: 18
Reputation: 3172
It was my fault: the magicmodule
repository's pubspec.yaml
contained further references to the wrong GIT repository. (I did not expected for self-reference.)
Upvotes: 0