-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
dart format hangs on Windows when reading from stdin in the presubmit #46947
Comments
Note that simpler test cases like these work even on Windows: contents = """
void main() {}
"""
print('Format change')
process = subprocess.run(args, input=contents, text=True)
print(process.returncode)
contents = """
void main() {
"""
print('Syntax errror')
process = subprocess.run(args, input=contents, text=True)
print(process.returncode)
contents = """void main() {}
"""
print('No change')
process = subprocess.run(args, input=contents, text=True)
print(process.returncode) |
Is this a duplicate of #46600 (though that one was marked as fixed). |
I don't think so. Before #46600, this would hang on macOS as well. Now it seems to only happen on Windows for specific inputs. Also, a part of the fix was 44ffad5 which may have masked the issue. It removed the process.communicate causing the presubmit to no longer block on the |
The checked-in SDK is currently at |
Any update on this? I am forced to upload most of my CLs with |
#46947 Change-Id: Ia632fbc73627504f96ef06fa99fff1f343ef6698 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212047 Reviewed-by: Johnni Winther <johnniwinther@google.com>
Sorry for the delay. I was out on vacation.
I've never seen anything like that before, sorry. :( I also don't have a Windows machine to try to repro this on. For what it's worth, dart_style does have tests for reading from stdin and I believe those tests are run and pass on Windows in the SDK. However, those tests also weren't sufficient to catch #46600. I don't recall exactly why. I think maybe because the tests spawn It looks like those messages are printed by the VM ( |
The script below hangs on Windows but works fine on other platforms (change the hard coded depot_tools location in the script before running it):
For some reason, dart format hangs reports weird formatting errors and starts to print messages like this:
On other platforms, the script exits normally and
dart format
finds no formatting issues.@bkonyi @munificent Any ideas about what could go wrong here? Perhaps line ending confusion?
/cc @johnniwinther
The text was updated successfully, but these errors were encountered: