diff --git a/lib/dart/.analysis_options b/lib/dart/.analysis_options new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/lib/dart/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/lib/dart/lib/src/transport/t_http_transport.dart b/lib/dart/lib/src/transport/t_http_transport.dart index bd821f444..aa78e9c15 100644 --- a/lib/dart/lib/src/transport/t_http_transport.dart +++ b/lib/dart/lib/src/transport/t_http_transport.dart @@ -75,7 +75,7 @@ class THttpConfig { final Uri url; Map _headers; - get headers => _headers; + Map get headers => _headers; THttpConfig(this.url, Map headers) { if (url == null || !url.hasAuthority) { diff --git a/lib/dart/lib/src/transport/t_socket_transport.dart b/lib/dart/lib/src/transport/t_socket_transport.dart index 824260d1e..8dcdfdefc 100644 --- a/lib/dart/lib/src/transport/t_socket_transport.dart +++ b/lib/dart/lib/src/transport/t_socket_transport.dart @@ -76,7 +76,7 @@ class TClientSocketTransport extends TSocketTransport { // Use a sync completer to ensure that the buffer can be read immediately // after the read buffer is set, and avoid a race condition where another // response could overwrite the read buffer. - Completer completer = new Completer.sync(); + var completer = new Completer.sync(); _completers.add(completer); socket.send(bytes); @@ -123,7 +123,7 @@ class TAsyncClientSocketTransport extends TSocketTransport { // Use a sync completer to ensure that the buffer can be read immediately // after the read buffer is set, and avoid a race condition where another // response could overwrite the read buffer. - Completer completer = new Completer.sync(); + var completer = new Completer.sync(); _completers[seqid] = completer; if (responseTimeout != null) { diff --git a/lib/dart/pubspec.yaml b/lib/dart/pubspec.yaml index 53f5450f2..f7aa8768a 100644 --- a/lib/dart/pubspec.yaml +++ b/lib/dart/pubspec.yaml @@ -22,15 +22,22 @@ description: > author: Apache Thrift Developers homepage: http://thrift.apache.org documentation: http://thrift.apache.org + environment: sdk: ">=1.13.0 <2.0.0" + dependencies: - fixnum: "^0.10.2" - http: "^0.11.3" - logging: "^0.11.0" + fixnum: ^0.10.2 + http: ^0.11.3 + logging: ^0.11.0 + dev_dependencies: - coverage: "^0.7.2" - dart_dev: "^1.0.1" - dart_style: "^0.2.0" - mockito: "^0.11.0" - test: "^0.12.0" + # test + mockito: ^1.0.0 + test: ^0.12.0 + + # dart_dev - https://github.com/Workiva/dart_dev + dart_dev: ^1.5.0 + coverage: ^0.7.3 + dart_style: ">=0.2.4 <0.3.0" + dartdoc: ^0.9.0 diff --git a/lib/dart/test/serializer/serializer_test_data.dart b/lib/dart/test/serializer/serializer_test_data.dart index f957e3d69..3586f08fc 100644 --- a/lib/dart/test/serializer/serializer_test_data.dart +++ b/lib/dart/test/serializer/serializer_test_data.dart @@ -163,7 +163,7 @@ class TestTObject implements TBase { if (value == null) { unsetL(); } else { - this.l = value; + this.l = value as List; } break; @@ -339,4 +339,4 @@ class TestTObject implements TBase { // check that fields of type enum have valid values } -} \ No newline at end of file +} diff --git a/test/dart/test_client/.analysis_options b/test/dart/test_client/.analysis_options new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/test/dart/test_client/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/test/dart/test_client/bin/main.dart b/test/dart/test_client/bin/main.dart index 78a4f79ee..996844b5b 100644 --- a/test/dart/test_client/bin/main.dart +++ b/test/dart/test_client/bin/main.dart @@ -251,7 +251,7 @@ List _createTests() { })); tests.add(new TTest(TEST_CONTAINERS, 'testSet', () async { - var input = new Set.from([-2, -1, 0, 1, 2]); + var input = new Set.from([-2, -1, 0, 1, 2]); var result = await client.testSet(input); var equality = const SetEquality(); if (!equality.equals(result, input)) throw new TTestError(result, input); diff --git a/test/dart/test_client/pubspec.yaml b/test/dart/test_client/pubspec.yaml index 493ee328e..a91aa455a 100644 --- a/test/dart/test_client/pubspec.yaml +++ b/test/dart/test_client/pubspec.yaml @@ -20,8 +20,10 @@ version: 1.0.0-dev description: A client integration test for the Dart Thrift library author: Apache Thrift Developers homepage: http://thrift.apache.org + environment: - sdk: ^1.12.0 + sdk: ">=1.13.0 <2.0.0" + dependencies: args: ^0.13.0 http: ^0.11.0 @@ -29,5 +31,6 @@ dependencies: path: ../../../lib/dart thrift_test: path: ../gen-dart/thrift_test + dev_dependencies: test: "^0.12.0" diff --git a/tutorial/dart/client/.analysis_options b/tutorial/dart/client/.analysis_options new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/tutorial/dart/client/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/tutorial/dart/client/pubspec.yaml b/tutorial/dart/client/pubspec.yaml index 4bd3394a1..db64afcfc 100644 --- a/tutorial/dart/client/pubspec.yaml +++ b/tutorial/dart/client/pubspec.yaml @@ -22,7 +22,7 @@ author: Apache Thrift Developers homepage: http://thrift.apache.org environment: - sdk: ^1.12.0 + sdk: ">=1.13.0 <2.0.0" dependencies: browser: ^0.10.0 diff --git a/tutorial/dart/console_client/.analysis_options b/tutorial/dart/console_client/.analysis_options new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/tutorial/dart/console_client/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/tutorial/dart/console_client/pubspec.yaml b/tutorial/dart/console_client/pubspec.yaml index 1423ed279..cea13acd5 100644 --- a/tutorial/dart/console_client/pubspec.yaml +++ b/tutorial/dart/console_client/pubspec.yaml @@ -21,8 +21,10 @@ description: > A Dart console client to implementation of the Apache Thrift tutorial author: Apache Thrift Developers homepage: http://thrift.apache.org + environment: - sdk: ^1.12.0 + sdk: ">=1.13.0 <2.0.0" + dependencies: args: ^0.13.0 collection: ^1.1.0 diff --git a/tutorial/dart/server/.analysis_options b/tutorial/dart/server/.analysis_options new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/tutorial/dart/server/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/tutorial/dart/server/pubspec.yaml b/tutorial/dart/server/pubspec.yaml index cdb2dc7a3..4833a4af8 100644 --- a/tutorial/dart/server/pubspec.yaml +++ b/tutorial/dart/server/pubspec.yaml @@ -20,8 +20,10 @@ version: 1.0.0-dev description: A Dart server to support the Apache Thrift tutorial author: Apache Thrift Developers homepage: http://thrift.apache.org + environment: - sdk: ^1.12.0 + sdk: ">=1.13.0 <2.0.0" + dependencies: args: ^0.13.0 shared: