refactor(dart/transform): Remove `reflectPropertiesAsAttributes`
Remove deprecated `reflectPropertiesAsAttributes` as an option. It has been renamed `reflect_properties_as_attributes`. Closes #5108 Closes #5512
This commit is contained in:
parent
fcc7ce225e
commit
2ada3ecad5
|
@ -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';
|
||||
|
|
|
@ -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.');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue