Skip to content

Commit 06bfd19

Browse files
authored
Fix hang when reading from stdin. (#1046)
The tests for dart_style do not seem to trigger this bug, and I'm not sure why not. But I can repro it in dartdev, and I have a test there that will trigger the bug. So I'm going to push out this fix, roll it into the SDK, and land the dartdev test with that roll.
1 parent 32969c1 commit 06bfd19

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.0.3
2+
3+
* Fix hang when reading from stdin (https://github.com/dart-lang/sdk/issues/46600).
4+
15
# 2.0.2
26

37
* Don't unnecessarily split argument lists with `/* */` comments (#837).

lib/src/cli/formatter_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'show.dart';
1313
import 'summary.dart';
1414

1515
// Note: The following line of code is modified by tool/grind.dart.
16-
const dartStyleVersion = '2.0.2';
16+
const dartStyleVersion = '2.0.3';
1717

1818
/// Global options that affect how the formatter produces and uses its outputs.
1919
class FormatterOptions {

lib/src/io.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Future<void> formatStdin(
3939
var output = formatter.formatSource(source);
4040
options.afterFile(null, name, output,
4141
changed: source.text != output.text);
42-
return;
4342
} on FormatterException catch (err) {
4443
stderr.writeln(err.message());
4544
exitCode = 65; // sysexits.h: EX_DATAERR

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_style
22
# Note: See tool/grind.dart for how to bump the version.
3-
version: 2.0.2
3+
version: 2.0.3
44
description: >-
55
Opinionated, automatic Dart source code formatter.
66
Provides an API and a CLI tool.

0 commit comments

Comments
 (0)