From 35df12c5560cbfd96f83c09a0b57cbdc240ea960 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 13 Feb 2017 14:08:38 -0800 Subject: [PATCH] Reflow and format help message Use concatenated `''` rather than `'''` so that we can break lines separately in the source from where we want them broken in the output --- CHANGELOG.md | 4 ++++ lib/src/builder.dart | 10 ++++++---- pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b73935..09220609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.4+1 + +* Give more information when `dartfmt` fails. + ## 0.5.4 * Update to latest `build`, `build_runner`, and `build_test` releases. diff --git a/lib/src/builder.dart b/lib/src/builder.dart index 58508591..8224695b 100644 --- a/lib/src/builder.dart +++ b/lib/src/builder.dart @@ -78,10 +78,12 @@ class GeneratorBuilder extends Builder { genPartContent = formatter.format(genPartContent); } catch (e, stack) { buildStep.logger.severe( - '''Error formatting generated source code for ${library.identifier} -which was output to ${_generatedFile(buildStep.inputId).path}.\n -This may indicate an issue in the generated code or in the formatter.\n -Please check the generated code and file an issue on source_gen if appropriate.''', + 'Error formatting generated source code for ${library.identifier}' + 'which was output to ${_generatedFile(buildStep.inputId).path}.\n' + 'This may indicate an issue in the generated code or in the ' + 'formatter.\n' + 'Please check the generated code and file an issue on source_gen if ' + 'appropriate.', e, stack); } diff --git a/pubspec.yaml b/pubspec.yaml index 5a919b03..a2a86f47 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: source_gen -version: 0.5.4 +version: 0.5.4+1 author: Dart Team description: Automatic sourcecode generation for Dart homepage: https://github.com/dart-lang/source_gen