Closed dnys1 closed 2 years ago
This happens randomly on packages, even when nothing is miss-spelled or no dependency at all Take an example for this
name: flutter_datetime_picker
publish_to: "none"
description: A date time picker for flutter, you can choose date / time / date&time in English Dutch and Chinese, and you can also custom your own picker content
version: 1.5.1
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
For the first time it bootstrapped then after adding more packages this started to hang.
A good example to reproduce this is to clone the flutterfire repo on a new machine and do melos bootstrap, it will hang and does not report anything.
I second @dnys1 to have some sort of console output so we can know how to troubleshoot. @Salakar
This happens randomly on packages, even when nothing is miss-spelled or no dependency at all
We are experiencing this too, it's very strange. Anything I can do to help troubleshoot this?
EDIT: Our issue was actually the same as the original poster's issue, it failed silently due to a git error:
Git error. Command:
git fetch
stdout: stderr: fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. exit code: 128
A bit unrelated, but if anyone else runs into this when having git dependencies, just change to https
.
There needs to be way more logging indicating what package is currently being worked on and . Is there more than just melos bootstrap --verbose
??
How about we let bootstrapping of a package fail if pub get
does not finish after a timeout of 30 seconds? After the timeout, the collected output of pub
would be printed as part of the error message.
Update:
This issue in the pub
has more background on what is going on. dart pub get
does fail immediately when a dependency is misspelled. flutter pub get
has its own additional infinite retry loop, which was implemented for a reason, and it's probably not a good idea to negate it.
We want to avoid spamming the console with the output from all concurrently running pub get
invocations. An alternative would be to only start printing the output of pub get
after some amount of time, e.g. 30s.
The
bootstrap
command will hang onpub get
when one of the packages cannot be found (e.g. if the name was misspelled, likepedantc
instead ofpedantic
). This is actually quite easy to do while havingdart.runPubGetOnPubspecChanges
set to false in VSCode.The issue is that
pub get
will keep retrying so the command never completes with an exit code, which_runPubGetForPackage
expects. It took me a while to figure out why this was happening because there was no output to the console. One solution could be to pipe stderr for these commands to the console, instead of waiting until the command completes, which would alert the developer that something is wrong.