New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"flutter pub get" does not terminate when killed #61357
Comments
The One option would be changing the |
We'd probably need to ensure we can do this on Windows with Another option could be to have |
Looks like there isn't a
Some other possible ideas:
|
Hi @DanTup, I tried running your code and I see the process does get killed. But the output seems to give a misleading message though.
when my pubspec has a constraint environment:
sdk: ">=2.16.2 <3.0.0" logs
flutter doctor -v (mac)
|
@maheshmnj I also can't repro on macOS any more. However, I can still repro on Windows. You need to change Edit: Confirmed same behaviour on both stable and master. |
This came up in Dart-Code/Dart-Code#2612. If you run
flutter pub get
and try to kill it programatically (similar to how Dart-Code would if you clicked the Cancel button on the dialog), the process doesn't terminate.To repro, you can use this script which creates a
pubspec.yaml
with an invalid package name, which puts Flutter into an endless loop of retries (which is discussed in dart-lang/pub#2242), and then tries to kill it - however it does not stop.I repro'd this using latest Flutter master today.
Output:
This results in orphaned processes being left around forever if the user ever saves pubspec with an invalid package name. I thought it might have been related to dart-lang/sdk#42092, however that seems to have been included in this version of Flutter but it's still not fixed.
(it's very possible this is a similar issue to we have elsewhere, where sending kill signals to a shell-executed process is unreliable.. we get around this in may places by emitting some JSON with the pid and adding that to the list of things to terminate - however
pub get
doesn't have a machine mode to add that too).The text was updated successfully, but these errors were encountered: