Revert support for constructor tear-offs and republish as 2.1.1. (#1058)
This enables pub to avoid selecting 2.1.0, which has a bad constraint
on analyzer (#1051).
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b10e7d0..2cbe5ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 2.1.1
+
+* Republish 2.0.3 as 2.1.1 in order to avoid users getting 2.1.0, which has a
+ bad dependency constraint (#1051).
+
# 2.1.0
* Support generic function references and constructor tear-offs (#1028).
diff --git a/lib/src/cli/formatter_options.dart b/lib/src/cli/formatter_options.dart
index 026d0e4..2f7072e 100644
--- a/lib/src/cli/formatter_options.dart
+++ b/lib/src/cli/formatter_options.dart
@@ -13,7 +13,7 @@
import 'summary.dart';
// Note: The following line of code is modified by tool/grind.dart.
-const dartStyleVersion = '2.1.0';
+const dartStyleVersion = '2.1.1';
/// Global options that affect how the formatter produces and uses its outputs.
class FormatterOptions {
diff --git a/lib/src/dart_formatter.dart b/lib/src/dart_formatter.dart
index 2510ace..7f437a9 100644
--- a/lib/src/dart_formatter.dart
+++ b/lib/src/dart_formatter.dart
@@ -89,7 +89,6 @@
var featureSet = FeatureSet.fromEnableFlags2(
sdkLanguageVersion: Version(2, 13, 0),
flags: [
- 'constructor-tearoffs',
'generic-metadata',
'nonfunction-type-aliases',
'triple-shift'
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index 4a53ae6..d08f18f 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -1806,12 +1806,6 @@
}
@override
- void visitFunctionReference(FunctionReference node) {
- visit(node.function);
- visit(node.typeArguments);
- }
-
- @override
void visitFunctionTypeAlias(FunctionTypeAlias node) {
visitMetadata(node.metadata);
diff --git a/pubspec.yaml b/pubspec.yaml
index 60ebc07..d948147 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: dart_style
# Note: See tool/grind.dart for how to bump the version.
-version: 2.1.0
+version: 2.1.1
description: >-
Opinionated, automatic Dart source code formatter.
Provides an API and a CLI tool.
diff --git a/test/splitting/mixed.stmt b/test/splitting/mixed.stmt
index f14c4ef..7d8dfff 100644
--- a/test/splitting/mixed.stmt
+++ b/test/splitting/mixed.stmt
@@ -222,12 +222,4 @@
<<<
var longVariableName =
identifierSoLongItWraps
- is SomeClassName;
->>> generic function reference nested inside expression
-veryLongFunction(argument, ConstructorTearOff<First, Second, Third, Fourth>, argument);
-<<<
-veryLongFunction(
- argument,
- ConstructorTearOff<First, Second,
- Third, Fourth>,
- argument);
\ No newline at end of file
+ is SomeClassName;
\ No newline at end of file
diff --git a/test/splitting/type_arguments.stmt b/test/splitting/type_arguments.stmt
index 77a2eb3..9675153 100644
--- a/test/splitting/type_arguments.stmt
+++ b/test/splitting/type_arguments.stmt
@@ -94,43 +94,4 @@
fifth,
sixth,
seventh,
- eighth);
->>> generic instantiation all fit on one line
-Foo<A,B,C,D>;
-<<<
-Foo<A, B, C, D>;
->>> generic instantiation split between args
-LongClassName<First, Second, Third, Fourth>;
-<<<
-LongClassName<First, Second, Third,
- Fourth>;
->>> generic instantiation split before first if needed
-LongClassName<FirstTypeArgumentIsTooLong, Second>;
-<<<
-LongClassName<
- FirstTypeArgumentIsTooLong, Second>;
->>> generic instantiation split in middle if fit in two lines
-LongClassName<First, Second, Third, Fourth, Fifth, Sixth, Seventh>;
-<<<
-LongClassName<First, Second, Third,
- Fourth, Fifth, Sixth, Seventh>;
->>> generic instantiation split one per line if they don't fit in two lines
-LongClassName<First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>;
-<<<
-LongClassName<
- First,
- Second,
- Third,
- Fourth,
- Fifth,
- Sixth,
- Seventh,
- Eighth>;
->>> generic instantiation indent nested type arguments
-LongClassName<First, Inner<Second, Third, Fourth, Fifth, Sixth, Seventh>, Eighth>;
-<<<
-LongClassName<
- First,
- Inner<Second, Third, Fourth, Fifth,
- Sixth, Seventh>,
- Eighth>;
\ No newline at end of file
+ eighth);
\ No newline at end of file
diff --git a/test/whitespace/expressions.stmt b/test/whitespace/expressions.stmt
index 23502ab..1a138dc 100644
--- a/test/whitespace/expressions.stmt
+++ b/test/whitespace/expressions.stmt
@@ -170,20 +170,4 @@
>>> generic function expression
var generic = < T,S >(){};
<<<
-var generic = <T, S>() {};
->>> generic method instantiation
-void main() => id < int > ;
-<<<
-void main() => id<int>;
->>> generic method instantiation
-void main() => id < int , String , bool > ;
-<<<
-void main() => id<int, String, bool>;
->>> generic constructor tear-off
-var x = Class < int >;
-<<<
-var x = Class<int>;
->>> generic name constructor tear-off
-var x = Class < int > . named;
-<<<
-var x = Class<int>.named;
\ No newline at end of file
+var generic = <T, S>() {};
\ No newline at end of file