From 2ada3ecad51fe28a959d26c47a7c3f968e531350 Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Mon, 30 Nov 2015 11:44:03 -0800 Subject: [PATCH] refactor(dart/transform): Remove `reflectPropertiesAsAttributes` Remove deprecated `reflectPropertiesAsAttributes` as an option. It has been renamed `reflect_properties_as_attributes`. Closes #5108 Closes #5512 --- .../lib/src/transform/common/options.dart | 2 -- .../lib/src/transform/common/options_reader.dart | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/modules_dart/transform/lib/src/transform/common/options.dart b/modules_dart/transform/lib/src/transform/common/options.dart index 9be884274d..460df8a616 100644 --- a/modules_dart/transform/lib/src/transform/common/options.dart +++ b/modules_dart/transform/lib/src/transform/common/options.dart @@ -9,8 +9,6 @@ const CUSTOM_ANNOTATIONS_PARAM = 'custom_annotations'; const ENTRY_POINT_PARAM = 'entry_points'; const FORMAT_CODE_PARAM = 'format_code'; const REFLECT_PROPERTIES_AS_ATTRIBUTES = 'reflect_properties_as_attributes'; -// TODO(kegluenq): Remove this after 30 Nov (i/5108). -const REFLECT_PROPERTIES_AS_ATTRIBUTES_OLD = 'reflectPropertiesAsAttributes'; const PLATFORM_DIRECTIVES = 'platform_directives'; const INIT_REFLECTOR_PARAM = 'init_reflector'; const INLINE_VIEWS_PARAM = 'inline_views'; diff --git a/modules_dart/transform/lib/src/transform/common/options_reader.dart b/modules_dart/transform/lib/src/transform/common/options_reader.dart index bd325c82e8..21a78b7e30 100644 --- a/modules_dart/transform/lib/src/transform/common/options_reader.dart +++ b/modules_dart/transform/lib/src/transform/common/options_reader.dart @@ -7,17 +7,11 @@ import 'options.dart'; TransformerOptions parseBarbackSettings(BarbackSettings settings) { var config = settings.configuration; - _warnDeprecated(config); var entryPoints = _readStringList(config, ENTRY_POINT_PARAM); var initReflector = _readBool(config, INIT_REFLECTOR_PARAM, defaultValue: true); var reflectPropertiesAsAttributes = _readBool(config, REFLECT_PROPERTIES_AS_ATTRIBUTES, defaultValue: false); - if (!config.containsKey(REFLECT_PROPERTIES_AS_ATTRIBUTES)) { - reflectPropertiesAsAttributes = _readBool( - config, REFLECT_PROPERTIES_AS_ATTRIBUTES_OLD, - defaultValue: false); - } var platformDirectives = _readStringList(config, PLATFORM_DIRECTIVES); var formatCode = _readBool(config, FORMAT_CODE_PARAM, defaultValue: false); String mirrorModeVal = @@ -121,11 +115,3 @@ const CUSTOM_ANNOTATIONS_ERROR = ''' - name: ... import: ... superClass: ...'''; - -void _warnDeprecated(Map config) { - if (config.containsKey(REFLECT_PROPERTIES_AS_ATTRIBUTES_OLD)) { - print('${REFLECT_PROPERTIES_AS_ATTRIBUTES_OLD} has been renamed to ' - '${REFLECT_PROPERTIES_AS_ATTRIBUTES}. Please update it in your ' - 'pubspec.'); - } -}