From 5a21d30702bbccbdccb9e53004bf9ceffa8ec5b0 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Mon, 20 Apr 2015 20:30:43 -0700 Subject: [PATCH 01/81] Initial commit. --- pkgs/test_reflective_loader/.gitignore | 8 ++ pkgs/test_reflective_loader/.status | 4 + pkgs/test_reflective_loader/AUTHORS | 6 + pkgs/test_reflective_loader/CHANGELOG.md | 5 + pkgs/test_reflective_loader/CONTRIBUTING.md | 33 +++++ pkgs/test_reflective_loader/LICENSE | 26 ++++ pkgs/test_reflective_loader/README.md | 26 ++++ .../lib/test_reflective_loader.dart | 121 ++++++++++++++++++ pkgs/test_reflective_loader/pubspec.yaml | 11 ++ 9 files changed, 240 insertions(+) create mode 100644 pkgs/test_reflective_loader/.gitignore create mode 100644 pkgs/test_reflective_loader/.status create mode 100644 pkgs/test_reflective_loader/AUTHORS create mode 100644 pkgs/test_reflective_loader/CHANGELOG.md create mode 100644 pkgs/test_reflective_loader/CONTRIBUTING.md create mode 100644 pkgs/test_reflective_loader/LICENSE create mode 100644 pkgs/test_reflective_loader/README.md create mode 100644 pkgs/test_reflective_loader/lib/test_reflective_loader.dart create mode 100644 pkgs/test_reflective_loader/pubspec.yaml diff --git a/pkgs/test_reflective_loader/.gitignore b/pkgs/test_reflective_loader/.gitignore new file mode 100644 index 000000000..89f7747cd --- /dev/null +++ b/pkgs/test_reflective_loader/.gitignore @@ -0,0 +1,8 @@ +.buildlog +.DS_Store +.idea +.pub/ +.settings/ +build/ +packages +pubspec.lock diff --git a/pkgs/test_reflective_loader/.status b/pkgs/test_reflective_loader/.status new file mode 100644 index 000000000..364ca4b46 --- /dev/null +++ b/pkgs/test_reflective_loader/.status @@ -0,0 +1,4 @@ +# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + diff --git a/pkgs/test_reflective_loader/AUTHORS b/pkgs/test_reflective_loader/AUTHORS new file mode 100644 index 000000000..0b1c48aa2 --- /dev/null +++ b/pkgs/test_reflective_loader/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. scheglov@google.com diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md new file mode 100644 index 000000000..2a2d63cf8 --- /dev/null +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 0.0.1 + +- Initial version diff --git a/pkgs/test_reflective_loader/CONTRIBUTING.md b/pkgs/test_reflective_loader/CONTRIBUTING.md new file mode 100644 index 000000000..6f5e0ea67 --- /dev/null +++ b/pkgs/test_reflective_loader/CONTRIBUTING.md @@ -0,0 +1,33 @@ +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. + +### File headers +All files in the project must start with the following header. + + // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + +### The small print +Contributions made by corporations are covered by a different agreement than the +one above, the +[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/test_reflective_loader/LICENSE b/pkgs/test_reflective_loader/LICENSE new file mode 100644 index 000000000..de31e1a0a --- /dev/null +++ b/pkgs/test_reflective_loader/LICENSE @@ -0,0 +1,26 @@ +Copyright 2015, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md new file mode 100644 index 000000000..cbc7e632c --- /dev/null +++ b/pkgs/test_reflective_loader/README.md @@ -0,0 +1,26 @@ +# test_reflective_loader + +Support for discovering tests and test suites using reflection. + +It follows the xUnit style where each class is a test suite, and each method +with the name prefix "test_" is a single text. + +Methods with names starting with "test_" are are run using test() function with +the corresponding name. If the class defines methods setUp() or tearDown(), +they are executed before / after each test correspondingly, even the test fails. + +Methods with names starting with "solo_test_" are run using solo_test() function. + +Methods with names starting with "fail_" are expected to fail. + +Methods with names starting with "solo_fail_" are run using solo_test() function +and expected to fail. + +Method returning Future class instances are asynchronous, so tearDown() is +executed after the returned Future completes. + +## Features and bugs + +Please file feature requests and bugs at the [issue tracker][tracker]. + +[tracker]: https://github.com/dart-lang/test_reflective_loader/issues diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart new file mode 100644 index 000000000..6ea195ad1 --- /dev/null +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -0,0 +1,121 @@ +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +library test_reflective_loader; + +@MirrorsUsed(metaTargets: 'ReflectiveTest') +import 'dart:mirrors'; +import 'dart:async'; + +import 'package:unittest/unittest.dart'; + +/** + * Runs test methods existing in the given [type]. + * + * Methods with names starting with `test` are run using [test] function. + * Methods with names starting with `solo_test` are run using [solo_test] function. + * + * Each method is run with a new instance of [type]. + * So, [type] should have a default constructor. + * + * If [type] declares method `setUp`, it methods will be invoked before any test + * method invocation. + * + * If [type] declares method `tearDown`, it will be invoked after any test + * method invocation. If method returns [Future] to test some asyncronous + * behavior, then `tearDown` will be invoked in `Future.complete`. + */ +void runReflectiveTests(Type type) { + ClassMirror classMirror = reflectClass(type); + if (!classMirror.metadata.any((InstanceMirror annotation) => + annotation.type.reflectedType == ReflectiveTest)) { + String name = MirrorSystem.getName(classMirror.qualifiedName); + throw new Exception('Class $name must have annotation "@reflectiveTest" ' + 'in order to be run by runReflectiveTests.'); + } + String className = MirrorSystem.getName(classMirror.simpleName); + group(className, () { + classMirror.instanceMembers.forEach((symbol, memberMirror) { + // we need only methods + if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) { + return; + } + String memberName = MirrorSystem.getName(symbol); + // test_ + if (memberName.startsWith('test_')) { + test(memberName, () { + return _runTest(classMirror, symbol); + }); + return; + } + // solo_test_ + if (memberName.startsWith('solo_test_')) { + solo_test(memberName, () { + return _runTest(classMirror, symbol); + }); + } + // fail_test_ + if (memberName.startsWith('fail_')) { + test(memberName, () { + return _runFailingTest(classMirror, symbol); + }); + } + // solo_fail_test_ + if (memberName.startsWith('solo_fail_')) { + solo_test(memberName, () { + return _runFailingTest(classMirror, symbol); + }); + } + }); + }); +} + +Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { + var invocationResult = null; + try { + invocationResult = instanceMirror.invoke(symbol, []).reflectee; + } on NoSuchMethodError {} + if (invocationResult is Future) { + return invocationResult; + } else { + return new Future.value(invocationResult); + } +} + +/** + * Run a test that is expected to fail, and confirm that it fails. + * + * This properly handles the following cases: + * - The test fails by throwing an exception + * - The test returns a future which completes with an error. + * + * However, it does not handle the case where the test creates an asynchronous + * callback using expectAsync(), and that callback generates a failure. + */ +Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { + return new Future(() => _runTest(classMirror, symbol)).then((_) { + fail('Test passed - expected to fail.'); + }, onError: (_) {}); +} + +_runTest(ClassMirror classMirror, Symbol symbol) { + InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); + return _invokeSymbolIfExists(instanceMirror, #setUp) + .then((_) => instanceMirror.invoke(symbol, []).reflectee) + .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); +} + +/** + * A marker annotation used to instruct dart2js to keep reflection information + * for the annotated classes. + */ +class ReflectiveTest { + const ReflectiveTest(); +} + +/** + * A marker annotation used to instruct dart2js to keep reflection information + * for the annotated classes. + */ +const ReflectiveTest reflectiveTest = const ReflectiveTest(); diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml new file mode 100644 index 000000000..b741dfcb3 --- /dev/null +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -0,0 +1,11 @@ +name: test_reflective_loader +version: 0.0.1 +description: Support for discovering tests and test suites using reflection. +author: Dart Team +homepage: https://github.com/dart-lang/test_reflective_loader + +environment: + sdk: '>=1.0.0 <2.0.0' + +dev_dependencies: + unittest: '>=0.9.0 <0.12.0' From b579ec016234986ed4e1e6d1a7343be8259b00e2 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 20 Apr 2015 21:15:46 -0700 Subject: [PATCH 02/81] Update AUTHORS Update the AUTHORS file --- pkgs/test_reflective_loader/AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/AUTHORS b/pkgs/test_reflective_loader/AUTHORS index 0b1c48aa2..e8063a8cd 100644 --- a/pkgs/test_reflective_loader/AUTHORS +++ b/pkgs/test_reflective_loader/AUTHORS @@ -3,4 +3,4 @@ # # Name/Organization -Google Inc. scheglov@google.com +Google Inc. From 4dfedd10086fe9fa0b28526e47d7eb43b3cc9d89 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Mon, 20 Apr 2015 21:31:43 -0700 Subject: [PATCH 03/81] Update version before publishing. --- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index b741dfcb3..d1c014eb3 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.0.1 +version: 0.0.2 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From 963318473007032f902c3b06732fdda574b0b609 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 20 Apr 2015 21:35:14 -0700 Subject: [PATCH 04/81] Update README.md --- pkgs/test_reflective_loader/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index cbc7e632c..e65e6fc90 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -2,22 +2,22 @@ Support for discovering tests and test suites using reflection. -It follows the xUnit style where each class is a test suite, and each method -with the name prefix "test_" is a single text. +This package follows the xUnit style where each class is a test suite, and each +method with the name prefix `test_` is a single test. -Methods with names starting with "test_" are are run using test() function with -the corresponding name. If the class defines methods setUp() or tearDown(), -they are executed before / after each test correspondingly, even the test fails. +Methods with names starting with `test_` are run using the `test()` function with +the corresponding name. If the class defines methods `setUp()` or `tearDown()`, +they are executed before / after each test correspondingly, even if the test fails. -Methods with names starting with "solo_test_" are run using solo_test() function. +Methods with names starting with `solo_test_` are run using the `solo_test()` function. -Methods with names starting with "fail_" are expected to fail. +Methods with names starting with `fail_` are expected to fail. -Methods with names starting with "solo_fail_" are run using solo_test() function +Methods with names starting with `solo_fail_` are run using the `solo_test()` function and expected to fail. -Method returning Future class instances are asynchronous, so tearDown() is -executed after the returned Future completes. +Method returning `Future` class instances are asynchronous, so `tearDown()` is +executed after the returned `Future` completes. ## Features and bugs From 76b8c7596d5378c24d0901da7f9589609cbc28cb Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Wed, 22 Apr 2015 12:24:18 -0700 Subject: [PATCH 05/81] Rename runReflectiveTests -> defineReflectiveTests. --- pkgs/test_reflective_loader/.gitignore | 1 + .../lib/test_reflective_loader.dart | 12 ++++++------ pkgs/test_reflective_loader/pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/test_reflective_loader/.gitignore b/pkgs/test_reflective_loader/.gitignore index 89f7747cd..65b96beca 100644 --- a/pkgs/test_reflective_loader/.gitignore +++ b/pkgs/test_reflective_loader/.gitignore @@ -2,6 +2,7 @@ .DS_Store .idea .pub/ +.project .settings/ build/ packages diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 6ea195ad1..f8387e34c 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -11,7 +11,7 @@ import 'dart:async'; import 'package:unittest/unittest.dart'; /** - * Runs test methods existing in the given [type]. + * Define tests using methods existing in the given [type]. * * Methods with names starting with `test` are run using [test] function. * Methods with names starting with `solo_test` are run using [solo_test] function. @@ -26,13 +26,13 @@ import 'package:unittest/unittest.dart'; * method invocation. If method returns [Future] to test some asyncronous * behavior, then `tearDown` will be invoked in `Future.complete`. */ -void runReflectiveTests(Type type) { +void defineReflectiveTests(Type type) { ClassMirror classMirror = reflectClass(type); if (!classMirror.metadata.any((InstanceMirror annotation) => - annotation.type.reflectedType == ReflectiveTest)) { + annotation.type.reflectedType == ReflectiveTest)) { String name = MirrorSystem.getName(classMirror.qualifiedName); throw new Exception('Class $name must have annotation "@reflectiveTest" ' - 'in order to be run by runReflectiveTests.'); + 'in order to be run by runReflectiveTests.'); } String className = MirrorSystem.getName(classMirror.simpleName); group(className, () { @@ -102,8 +102,8 @@ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { _runTest(ClassMirror classMirror, Symbol symbol) { InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); return _invokeSymbolIfExists(instanceMirror, #setUp) - .then((_) => instanceMirror.invoke(symbol, []).reflectee) - .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); + .then((_) => instanceMirror.invoke(symbol, []).reflectee) + .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); } /** diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index d1c014eb3..60d4ec8d0 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.0.2 +version: 0.0.3 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From 9e5d9a8f572d7f6eeb4cd1cf019738fdc08a5a34 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Wed, 31 Aug 2016 12:55:57 -0700 Subject: [PATCH 06/81] Update with implementation from 'analyzer'. R=brianwilkerson@google.com BUG= Review URL: https://codereview.chromium.org/2300503003 . --- pkgs/test_reflective_loader/CHANGELOG.md | 4 + .../codereview.settings | 4 + .../lib/test_reflective_loader.dart | 111 +++++++++++++++--- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 4 files changed, 103 insertions(+), 18 deletions(-) create mode 100644 pkgs/test_reflective_loader/codereview.settings diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 2a2d63cf8..da6f2f79d 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.0.4 + +- Added @failingTest, @assertFailingTest and @soloTest annotations. + ## 0.0.1 - Initial version diff --git a/pkgs/test_reflective_loader/codereview.settings b/pkgs/test_reflective_loader/codereview.settings new file mode 100644 index 000000000..3ba713c75 --- /dev/null +++ b/pkgs/test_reflective_loader/codereview.settings @@ -0,0 +1,4 @@ +# This file is used by gcl to get repository specific information. +CODE_REVIEW_SERVER: http://codereview.chromium.org +VIEW_VC: https://github.com/dart-lang/test_reflective_loader/commit/ +CC_LIST: reviews@dartlang.org diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index f8387e34c..6e3c945a2 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -4,14 +4,50 @@ library test_reflective_loader; +import 'dart:async'; @MirrorsUsed(metaTargets: 'ReflectiveTest') import 'dart:mirrors'; -import 'dart:async'; import 'package:unittest/unittest.dart'; /** - * Define tests using methods existing in the given [type]. + * A marker annotation used to annotate overridden test methods (so we cannot + * rename them to `fail_`) which are expected to fail at `assert` in the + * checked mode. + */ +const _AssertFailingTest assertFailingTest = const _AssertFailingTest(); + +/** + * A marker annotation used to annotate overridden test methods (so we cannot + * rename them to `fail_`) which are expected to fail. + */ +const _FailingTest failingTest = const _FailingTest(); + +/** + * A marker annotation used to instruct dart2js to keep reflection information + * for the annotated classes. + */ +const ReflectiveTest reflectiveTest = const ReflectiveTest(); + +/** + * Test classes annotated with this annotation are run using [solo_group]. + */ +const _SoloTest soloTest = const _SoloTest(); + +/** + * Is `true` the application is running in the checked mode. + */ +final bool _isCheckedMode = () { + try { + assert(false); + return false; + } catch (_) { + return true; + } +}(); + +/** + * Runs test methods existing in the given [type]. * * Methods with names starting with `test` are run using [test] function. * Methods with names starting with `solo_test` are run using [solo_test] function. @@ -23,20 +59,20 @@ import 'package:unittest/unittest.dart'; * method invocation. * * If [type] declares method `tearDown`, it will be invoked after any test - * method invocation. If method returns [Future] to test some asyncronous + * method invocation. If method returns [Future] to test some asynchronous * behavior, then `tearDown` will be invoked in `Future.complete`. */ void defineReflectiveTests(Type type) { ClassMirror classMirror = reflectClass(type); if (!classMirror.metadata.any((InstanceMirror annotation) => - annotation.type.reflectedType == ReflectiveTest)) { + annotation.type.reflectedType == ReflectiveTest)) { String name = MirrorSystem.getName(classMirror.qualifiedName); throw new Exception('Class $name must have annotation "@reflectiveTest" ' 'in order to be run by runReflectiveTests.'); } - String className = MirrorSystem.getName(classMirror.simpleName); - group(className, () { - classMirror.instanceMembers.forEach((symbol, memberMirror) { + void runMembers() { + classMirror.instanceMembers + .forEach((Symbol symbol, MethodMirror memberMirror) { // we need only methods if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) { return; @@ -45,7 +81,12 @@ void defineReflectiveTests(Type type) { // test_ if (memberName.startsWith('test_')) { test(memberName, () { - return _runTest(classMirror, symbol); + if (_hasFailingTestAnnotation(memberMirror) || + _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { + return _runFailingTest(classMirror, symbol); + } else { + return _runTest(classMirror, symbol); + } }); return; } @@ -68,19 +109,36 @@ void defineReflectiveTests(Type type) { }); } }); - }); + } + String className = MirrorSystem.getName(classMirror.simpleName); + if (_hasAnnotationInstance(classMirror, soloTest)) { + solo_group(className, runMembers); + } else { + group(className, runMembers); + } } +bool _hasAnnotationInstance(DeclarationMirror declaration, instance) => + declaration.metadata.any((InstanceMirror annotation) => + identical(annotation.reflectee, instance)); + +bool _hasAssertFailingTestAnnotation(MethodMirror method) => + _hasAnnotationInstance(method, assertFailingTest); + +bool _hasFailingTestAnnotation(MethodMirror method) => + _hasAnnotationInstance(method, failingTest); + Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { var invocationResult = null; + InstanceMirror closure; try { - invocationResult = instanceMirror.invoke(symbol, []).reflectee; + closure = instanceMirror.getField(symbol); } on NoSuchMethodError {} - if (invocationResult is Future) { - return invocationResult; - } else { - return new Future.value(invocationResult); + + if (closure is ClosureMirror) { + invocationResult = closure.apply([]).reflectee; } + return new Future.value(invocationResult); } /** @@ -115,7 +173,26 @@ class ReflectiveTest { } /** - * A marker annotation used to instruct dart2js to keep reflection information - * for the annotated classes. + * A marker annotation used to annotate overridden test methods (so we cannot + * rename them to `fail_`) which are expected to fail at `assert` in the + * checked mode. */ -const ReflectiveTest reflectiveTest = const ReflectiveTest(); +class _AssertFailingTest { + const _AssertFailingTest(); +} + +/** + * A marker annotation used to annotate overridden test methods (so we cannot + * rename them to `fail_`) which are expected to fail. + */ +class _FailingTest { + const _FailingTest(); +} + +/** + * A marker annotation used to annotate a test class to run it using + * [solo_group]. + */ +class _SoloTest { + const _SoloTest(); +} diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 60d4ec8d0..8b93c1eaf 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.0.3 +version: 0.0.4 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From 7cbedea9e7d1fa4e1b6092cb2fca6d5dbb162856 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Tue, 4 Oct 2016 12:48:15 -0700 Subject: [PATCH 07/81] Switch to 'test', add different support for 'solo'. R=brianwilkerson@google.com, paulberry@google.com BUG= Review URL: https://codereview.chromium.org/2388073004 . --- pkgs/test_reflective_loader/CHANGELOG.md | 7 + .../lib/test_reflective_loader.dart | 204 +++++++++++++----- pkgs/test_reflective_loader/pubspec.yaml | 4 +- 3 files changed, 164 insertions(+), 51 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index da6f2f79d..49931bb3b 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.1.0 + +- Switched from 'package:unittest' to 'package:test'. +- Since 'package:test' does not define 'solo_test', in order to keep + this functionality, `defineReflectiveSuite` must be used to wrap + all `defineReflectiveTests` invocations. + ## 0.0.4 - Added @failingTest, @assertFailingTest and @soloTest annotations. diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 6e3c945a2..375f5843c 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -8,7 +8,7 @@ import 'dart:async'; @MirrorsUsed(metaTargets: 'ReflectiveTest') import 'dart:mirrors'; -import 'package:unittest/unittest.dart'; +import 'package:test/test.dart' as test_package; /** * A marker annotation used to annotate overridden test methods (so we cannot @@ -30,10 +30,14 @@ const _FailingTest failingTest = const _FailingTest(); const ReflectiveTest reflectiveTest = const ReflectiveTest(); /** - * Test classes annotated with this annotation are run using [solo_group]. + * A marker annotation used to annotate "solo" groups and tests. */ const _SoloTest soloTest = const _SoloTest(); +final List<_Group> _currentGroups = <_Group>[]; +int _currentSuiteLevel = 0; +String _currentSuiteName = null; + /** * Is `true` the application is running in the checked mode. */ @@ -46,11 +50,34 @@ final bool _isCheckedMode = () { } }(); +/** + * Run the [define] function parameter that calls [defineReflectiveTests] to + * add normal and "solo" tests, and also calls [defineReflectiveSuite] to + * create embedded suites. If the current suite is the top-level one, perform + * check for "solo" groups and tests, and run all or only "solo" items. + */ +void defineReflectiveSuite(void define(), {String name}) { + String groupName = _currentSuiteName; + _currentSuiteLevel++; + try { + _currentSuiteName = _combineNames(_currentSuiteName, name); + define(); + } finally { + _currentSuiteName = groupName; + _currentSuiteLevel--; + } + _addTestsIfTopLevelSuite(); +} + /** * Runs test methods existing in the given [type]. * - * Methods with names starting with `test` are run using [test] function. - * Methods with names starting with `solo_test` are run using [solo_test] function. + * If there is a "solo" test method in the top-level suite, only "solo" methods + * are run. + * + * If there is a "solo" test type, only its test methods are run. + * + * Otherwise all tests methods of all test types are run. * * Each method is run with a new instance of [type]. * So, [type] should have a default constructor. @@ -65,56 +92,105 @@ final bool _isCheckedMode = () { void defineReflectiveTests(Type type) { ClassMirror classMirror = reflectClass(type); if (!classMirror.metadata.any((InstanceMirror annotation) => - annotation.type.reflectedType == ReflectiveTest)) { + annotation.type.reflectedType == ReflectiveTest)) { String name = MirrorSystem.getName(classMirror.qualifiedName); throw new Exception('Class $name must have annotation "@reflectiveTest" ' 'in order to be run by runReflectiveTests.'); } - void runMembers() { - classMirror.instanceMembers - .forEach((Symbol symbol, MethodMirror memberMirror) { - // we need only methods - if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) { - return; - } - String memberName = MirrorSystem.getName(symbol); - // test_ - if (memberName.startsWith('test_')) { - test(memberName, () { - if (_hasFailingTestAnnotation(memberMirror) || - _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { - return _runFailingTest(classMirror, symbol); - } else { - return _runTest(classMirror, symbol); - } - }); - return; - } - // solo_test_ - if (memberName.startsWith('solo_test_')) { - solo_test(memberName, () { - return _runTest(classMirror, symbol); - }); - } - // fail_test_ - if (memberName.startsWith('fail_')) { - test(memberName, () { - return _runFailingTest(classMirror, symbol); - }); - } - // solo_fail_test_ - if (memberName.startsWith('solo_fail_')) { - solo_test(memberName, () { + + _Group group; + { + bool isSolo = _hasAnnotationInstance(classMirror, soloTest); + String className = MirrorSystem.getName(classMirror.simpleName); + group = new _Group(isSolo, _combineNames(_currentSuiteName, className)); + _currentGroups.add(group); + } + + classMirror.instanceMembers + .forEach((Symbol symbol, MethodMirror memberMirror) { + // we need only methods + if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) { + return; + } + // prepare information about the method + String memberName = MirrorSystem.getName(symbol); + bool isSolo = memberName.startsWith('solo_') || + _hasAnnotationInstance(memberMirror, soloTest); + // test_ + if (memberName.startsWith('test_')) { + group.addTest(isSolo, memberName, () { + if (_hasFailingTestAnnotation(memberMirror) || + _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { return _runFailingTest(classMirror, symbol); - }); + } else { + return _runTest(classMirror, symbol); + } + }); + return; + } + // solo_test_ + if (memberName.startsWith('solo_test_')) { + group.addTest(true, memberName, () { + return _runTest(classMirror, symbol); + }); + } + // fail_test_ + if (memberName.startsWith('fail_')) { + group.addTest(isSolo, memberName, () { + return _runFailingTest(classMirror, symbol); + }); + } + // solo_fail_test_ + if (memberName.startsWith('solo_fail_')) { + group.addTest(true, memberName, () { + return _runFailingTest(classMirror, symbol); + }); + } + }); + + // Support for the case of missing enclosing [defineReflectiveSuite]. + _addTestsIfTopLevelSuite(); +} + +/** + * If the current suite is the top-level one, add tests to the `test` package. + */ +void _addTestsIfTopLevelSuite() { + if (_currentSuiteLevel == 0) { + void runTests({bool allGroups, bool allTests}) { + for (_Group group in _currentGroups) { + if (allGroups || group.isSolo) { + for (_Test test in group.tests) { + if (allTests || test.isSolo) { + test_package.test(test.name, test.function); + } + } + } } - }); + } + + if (_currentGroups.any((g) => g.hasSoloTest)) { + runTests(allGroups: true, allTests: false); + } else if (_currentGroups.any((g) => g.isSolo)) { + runTests(allGroups: false, allTests: true); + } else { + runTests(allGroups: true, allTests: true); + } + _currentGroups.clear(); } - String className = MirrorSystem.getName(classMirror.simpleName); - if (_hasAnnotationInstance(classMirror, soloTest)) { - solo_group(className, runMembers); +} + +/** + * Return the combination of the [base] and [addition] names. + * If any other two is `null`, then the other one is returned. + */ +String _combineNames(String base, String addition) { + if (base == null) { + return addition; + } else if (addition == null) { + return base; } else { - group(className, runMembers); + return '$base | $addition'; } } @@ -153,7 +229,7 @@ Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { */ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { return new Future(() => _runTest(classMirror, symbol)).then((_) { - fail('Test passed - expected to fail.'); + test_package.fail('Test passed - expected to fail.'); }, onError: (_) {}); } @@ -164,6 +240,8 @@ _runTest(ClassMirror classMirror, Symbol symbol) { .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); } +typedef _TestFunction(); + /** * A marker annotation used to instruct dart2js to keep reflection information * for the annotated classes. @@ -190,9 +268,37 @@ class _FailingTest { } /** - * A marker annotation used to annotate a test class to run it using - * [solo_group]. + * Information about a type based test group. + */ +class _Group { + final bool isSolo; + final String name; + final List<_Test> tests = <_Test>[]; + + _Group(this.isSolo, this.name); + + bool get hasSoloTest => tests.any((test) => test.isSolo); + + void addTest(bool isSolo, String name, _TestFunction function) { + String fullName = _combineNames(this.name, name); + tests.add(new _Test(isSolo, fullName, function)); + } +} + +/** + * A marker annotation used to annotate "solo" groups and tests. */ class _SoloTest { const _SoloTest(); } + +/** + * Information about a test. + */ +class _Test { + final bool isSolo; + final String name; + final _TestFunction function; + + _Test(this.isSolo, this.name, this.function); +} diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 8b93c1eaf..9373aec3b 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.0.4 +version: 0.1.0 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader @@ -8,4 +8,4 @@ environment: sdk: '>=1.0.0 <2.0.0' dev_dependencies: - unittest: '>=0.9.0 <0.12.0' + test: ^0.12.0 From 6ed30e41fb183f50fd709d4b82b63eba2b7c58f5 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 6 Dec 2017 23:02:04 -0800 Subject: [PATCH 08/81] handle exceptions to zone handlers in @failingTests --- pkgs/test_reflective_loader/.gitignore | 1 + pkgs/test_reflective_loader/CHANGELOG.md | 12 +++++++++--- .../test_reflective_loader/analysis_options.yaml | 5 +++++ .../lib/test_reflective_loader.dart | 16 ++++++++++------ pkgs/test_reflective_loader/pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 pkgs/test_reflective_loader/analysis_options.yaml diff --git a/pkgs/test_reflective_loader/.gitignore b/pkgs/test_reflective_loader/.gitignore index 65b96beca..67a390f24 100644 --- a/pkgs/test_reflective_loader/.gitignore +++ b/pkgs/test_reflective_loader/.gitignore @@ -6,4 +6,5 @@ .settings/ build/ packages +.packages pubspec.lock diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 49931bb3b..0ecc4c4ad 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,11 +1,17 @@ # Changelog +## 0.1.1 + +- For `@failingTest` tests, properly handle when the test fails by throwing an + exception in a timer task +- Analyze this package in strong mode + ## 0.1.0 - Switched from 'package:unittest' to 'package:test'. -- Since 'package:test' does not define 'solo_test', in order to keep - this functionality, `defineReflectiveSuite` must be used to wrap - all `defineReflectiveTests` invocations. +- Since 'package:test' does not define 'solo_test', in order to keep this + functionality, `defineReflectiveSuite` must be used to wrap all + `defineReflectiveTests` invocations. ## 0.0.4 diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml new file mode 100644 index 000000000..cee71221b --- /dev/null +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -0,0 +1,5 @@ +analyzer: + strong-mode: true +linter: + rules: + - directives_ordering diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 375f5843c..c833e6103 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -223,14 +223,18 @@ Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { * This properly handles the following cases: * - The test fails by throwing an exception * - The test returns a future which completes with an error. - * - * However, it does not handle the case where the test creates an asynchronous - * callback using expectAsync(), and that callback generates a failure. + * - An exception is thrown to the zone handler from a timer task. */ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { - return new Future(() => _runTest(classMirror, symbol)).then((_) { - test_package.fail('Test passed - expected to fail.'); - }, onError: (_) {}); + return runZoned(() { + return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { + test_package.fail('Test passed - expected to fail.'); + }).catchError((e) { + // an exception is not a failure for _runFailingTest + }); + }, onError: (e) { + // an exception is not a failure for _runFailingTest + }); } _runTest(ClassMirror classMirror, Symbol symbol) { diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 9373aec3b..b0ab5d3aa 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.0 +version: 0.1.1 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From f68b6268b5e2a5d470178c44273ca8801baa48c5 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 7 Dec 2017 18:48:05 -0800 Subject: [PATCH 09/81] Update pubspec.yaml --- pkgs/test_reflective_loader/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index b0ab5d3aa..73e6d63d7 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.1 +version: 0.1.2 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader @@ -7,5 +7,5 @@ homepage: https://github.com/dart-lang/test_reflective_loader environment: sdk: '>=1.0.0 <2.0.0' -dev_dependencies: +dependencies: test: ^0.12.0 From b34ceea36d819dd634a7d10c03d7cfd85e68a04a Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 7 Dec 2017 18:50:27 -0800 Subject: [PATCH 10/81] update the changelog --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 0ecc4c4ad..59b2b0093 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.2 + +- Update the pubspec `dependencies` section to include `package:test` + ## 0.1.1 - For `@failingTest` tests, properly handle when the test fails by throwing an From 7d0d18b879e991c5e2b1f68aedf334b708c6fee5 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Fri, 8 Dec 2017 10:35:48 -0800 Subject: [PATCH 11/81] Fail @failingTest when the test passes. --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ .../lib/test_reflective_loader.dart | 14 ++++++++++++-- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 59b2b0093..6e5b8519c 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.3 + +- Fix `@failingTest` to fail when the test passes. + ## 0.1.2 - Update the pubspec `dependencies` section to include `package:test` diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index c833e6103..9ebaf84e4 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -226,14 +226,24 @@ Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { * - An exception is thrown to the zone handler from a timer task. */ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { + bool passed = false; return runZoned(() { return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { + passed = true; test_package.fail('Test passed - expected to fail.'); }).catchError((e) { - // an exception is not a failure for _runFailingTest + // if passed, and we call fail(), rethrow this exception + if (passed) { + throw e; + } + // otherwise, an exception is not a failure for _runFailingTest }); }, onError: (e) { - // an exception is not a failure for _runFailingTest + // if passed, and we call fail(), rethrow this exception + if (passed) { + throw e; + } + // otherwise, an exception is not a failure for _runFailingTest }); } diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 73e6d63d7..1360d687b 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.2 +version: 0.1.3 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From b2e03b735317f1ac5b8af6c0e22caa0ef4b81548 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Fri, 8 Dec 2017 10:49:32 -0800 Subject: [PATCH 12/81] Require at least SDK 1.8.0 because 'pub publish' demands this. --- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 1360d687b..7e5440438 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -5,7 +5,7 @@ author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: - sdk: '>=1.0.0 <2.0.0' + sdk: '>=1.8.0 <2.0.0' dependencies: test: ^0.12.0 From 4638060da73eb38927ed277228dcdca4162d5f86 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 8 Dec 2017 13:10:56 -0800 Subject: [PATCH 13/81] add tests, travis support, some lints --- pkgs/test_reflective_loader/.travis.yml | 2 + .../analysis_options.yaml | 2 + .../lib/test_reflective_loader.dart | 12 +++--- .../test/test_reflective_loader_test.dart | 40 +++++++++++++++++++ pkgs/test_reflective_loader/tool/travis.sh | 16 ++++++++ 5 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 pkgs/test_reflective_loader/.travis.yml create mode 100644 pkgs/test_reflective_loader/test/test_reflective_loader_test.dart create mode 100755 pkgs/test_reflective_loader/tool/travis.sh diff --git a/pkgs/test_reflective_loader/.travis.yml b/pkgs/test_reflective_loader/.travis.yml new file mode 100644 index 000000000..9c3a39f97 --- /dev/null +++ b/pkgs/test_reflective_loader/.travis.yml @@ -0,0 +1,2 @@ +language: dart +script: ./tool/travis.sh diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml index cee71221b..5f425e0e1 100644 --- a/pkgs/test_reflective_loader/analysis_options.yaml +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -2,4 +2,6 @@ analyzer: strong-mode: true linter: rules: + - always_declare_return_types - directives_ordering + - public_member_api_docs diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 9ebaf84e4..fa0d91df7 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -27,7 +27,7 @@ const _FailingTest failingTest = const _FailingTest(); * A marker annotation used to instruct dart2js to keep reflection information * for the annotated classes. */ -const ReflectiveTest reflectiveTest = const ReflectiveTest(); +const _ReflectiveTest reflectiveTest = const _ReflectiveTest(); /** * A marker annotation used to annotate "solo" groups and tests. @@ -92,7 +92,7 @@ void defineReflectiveSuite(void define(), {String name}) { void defineReflectiveTests(Type type) { ClassMirror classMirror = reflectClass(type); if (!classMirror.metadata.any((InstanceMirror annotation) => - annotation.type.reflectedType == ReflectiveTest)) { + annotation.type.reflectedType == _ReflectiveTest)) { String name = MirrorSystem.getName(classMirror.qualifiedName); throw new Exception('Class $name must have annotation "@reflectiveTest" ' 'in order to be run by runReflectiveTests.'); @@ -247,21 +247,21 @@ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { }); } -_runTest(ClassMirror classMirror, Symbol symbol) { +Future _runTest(ClassMirror classMirror, Symbol symbol) { InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); return _invokeSymbolIfExists(instanceMirror, #setUp) .then((_) => instanceMirror.invoke(symbol, []).reflectee) .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); } -typedef _TestFunction(); +typedef dynamic _TestFunction(); /** * A marker annotation used to instruct dart2js to keep reflection information * for the annotated classes. */ -class ReflectiveTest { - const ReflectiveTest(); +class _ReflectiveTest { + const _ReflectiveTest(); } /** diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart new file mode 100644 index 000000000..be070a0dd --- /dev/null +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:test/test.dart'; +import 'package:test_reflective_loader/test_reflective_loader.dart'; + +// ignore_for_file: always_declare_return_types + +void main() { + defineReflectiveSuite(() { + defineReflectiveTests(TestReflectiveLoaderTest); + }); +} + +@reflectiveTest +class TestReflectiveLoaderTest { + String pathname; + + test_passes() { + expect(true, true); + } + + @failingTest + test_fails() { + expect(false, true); + } + + @failingTest + test_fails_throws_sync() { + throw 'foo'; + } + + @failingTest + test_fails_throws_async() { + return new Future.error('foo'); + } +} diff --git a/pkgs/test_reflective_loader/tool/travis.sh b/pkgs/test_reflective_loader/tool/travis.sh new file mode 100755 index 000000000..ea0f1c495 --- /dev/null +++ b/pkgs/test_reflective_loader/tool/travis.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +# Fast fail the script on failures. +set -e + +# Verify that the libraries are error free. +dartanalyzer --fatal-warnings \ + lib/test_reflective_loader.dart \ + test/test_reflective_loader_test.dart + +# Run the tests. +dart test/test_reflective_loader_test.dart From 0dd69713f42f352247f07443f5e4bc9ff7ddb502 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 8 Dec 2017 13:18:43 -0800 Subject: [PATCH 14/81] add return types --- .../test/test_reflective_loader_test.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index be070a0dd..952fe0a1d 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -7,8 +7,6 @@ import 'dart:async'; import 'package:test/test.dart'; import 'package:test_reflective_loader/test_reflective_loader.dart'; -// ignore_for_file: always_declare_return_types - void main() { defineReflectiveSuite(() { defineReflectiveTests(TestReflectiveLoaderTest); @@ -19,22 +17,22 @@ void main() { class TestReflectiveLoaderTest { String pathname; - test_passes() { + void test_passes() { expect(true, true); } @failingTest - test_fails() { + void test_fails() { expect(false, true); } @failingTest - test_fails_throws_sync() { + void test_fails_throws_sync() { throw 'foo'; } @failingTest - test_fails_throws_async() { + Future test_fails_throws_async() { return new Future.error('foo'); } } From 3b8a376858f82b52a9393d9721e82def3da16d17 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 8 Dec 2017 14:11:39 -0800 Subject: [PATCH 15/81] Update README.md --- pkgs/test_reflective_loader/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index e65e6fc90..66dca98c2 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -1,5 +1,7 @@ # test_reflective_loader +[![Build Status](https://travis-ci.org/dart-lang/test_reflective_loader.svg?branch=master)](https://travis-ci.org/dart-lang/test_reflective_loader) + Support for discovering tests and test suites using reflection. This package follows the xUnit style where each class is a test suite, and each From 17ee37f6356a9be86d0b0a7a050305a37343155f Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 26 Mar 2018 01:28:38 -0700 Subject: [PATCH 16/81] Add timeout support to test_reflective_loader. To use it, annotate a method with @TestTimeout(t) where t is a const instance of the Timeout class from the `test` package. E.g.: @TestTimeout(const Timeout.factor(2)) --- .../lib/test_reflective_loader.dart | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 9ebaf84e4..4aac7b21d 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -118,7 +118,7 @@ void defineReflectiveTests(Type type) { _hasAnnotationInstance(memberMirror, soloTest); // test_ if (memberName.startsWith('test_')) { - group.addTest(isSolo, memberName, () { + group.addTest(isSolo, memberName, memberMirror, () { if (_hasFailingTestAnnotation(memberMirror) || _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { return _runFailingTest(classMirror, symbol); @@ -130,19 +130,19 @@ void defineReflectiveTests(Type type) { } // solo_test_ if (memberName.startsWith('solo_test_')) { - group.addTest(true, memberName, () { + group.addTest(true, memberName, memberMirror, () { return _runTest(classMirror, symbol); }); } // fail_test_ if (memberName.startsWith('fail_')) { - group.addTest(isSolo, memberName, () { + group.addTest(isSolo, memberName, memberMirror, () { return _runFailingTest(classMirror, symbol); }); } // solo_fail_test_ if (memberName.startsWith('solo_fail_')) { - group.addTest(true, memberName, () { + group.addTest(true, memberName, memberMirror, () { return _runFailingTest(classMirror, symbol); }); } @@ -162,7 +162,8 @@ void _addTestsIfTopLevelSuite() { if (allGroups || group.isSolo) { for (_Test test in group.tests) { if (allTests || test.isSolo) { - test_package.test(test.name, test.function); + test_package.test(test.name, test.function, + timeout: test.timeout); } } } @@ -194,6 +195,15 @@ String _combineNames(String base, String addition) { } } +Object _getAnnotationInstance(DeclarationMirror declaration, Type type) { + for (InstanceMirror annotation in declaration.metadata) { + if (annotation.reflectee.runtimeType == type) { + return annotation.reflectee; + } + } + return null; +} + bool _hasAnnotationInstance(DeclarationMirror declaration, instance) => declaration.metadata.any((InstanceMirror annotation) => identical(annotation.reflectee, instance)); @@ -264,6 +274,16 @@ class ReflectiveTest { const ReflectiveTest(); } +/** + * A marker annotation used to annotate overridden test methods with additional + * timeout information. + */ +class TestTimeout { + final test_package.Timeout timeout; + + const TestTimeout(this.timeout); +} + /** * A marker annotation used to annotate overridden test methods (so we cannot * rename them to `fail_`) which are expected to fail at `assert` in the @@ -293,9 +313,11 @@ class _Group { bool get hasSoloTest => tests.any((test) => test.isSolo); - void addTest(bool isSolo, String name, _TestFunction function) { + void addTest(bool isSolo, String name, MethodMirror memberMirror, + _TestFunction function) { String fullName = _combineNames(this.name, name); - tests.add(new _Test(isSolo, fullName, function)); + TestTimeout timeout = _getAnnotationInstance(memberMirror, TestTimeout); + tests.add(new _Test(isSolo, fullName, function, timeout?.timeout)); } } @@ -313,6 +335,7 @@ class _Test { final bool isSolo; final String name; final _TestFunction function; + final test_package.Timeout timeout; - _Test(this.isSolo, this.name, this.function); + _Test(this.isSolo, this.name, this.function, this.timeout); } From d99ea36acc8c99c5d1bb13145c2e9d92e7fedd75 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 26 Mar 2018 10:18:54 -0700 Subject: [PATCH 17/81] Fix comment --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 4aac7b21d..a309948c7 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -275,8 +275,8 @@ class ReflectiveTest { } /** - * A marker annotation used to annotate overridden test methods with additional - * timeout information. + * A marker annotation used to annotate test methods with additional timeout + * information. */ class TestTimeout { final test_package.Timeout timeout; From b96e1fde8c7cac9cb889fe8e883a01e578e1b288 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 26 Mar 2018 10:25:50 -0700 Subject: [PATCH 18/81] Update pubspec version to 0.1.4 in preparation to publish --- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 7e5440438..ae718e8fd 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.3 +version: 0.1.4 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader From fc2e3929c120944b4c24e4d7f828225a4af1fdbb Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 16 Jul 2018 10:43:48 -0400 Subject: [PATCH 19/81] chore: set max SDK version to <3.0.0 --- pkgs/test_reflective_loader/.gitignore | 1 + pkgs/test_reflective_loader/.travis.yml | 1 + pkgs/test_reflective_loader/CHANGELOG.md | 4 +++- pkgs/test_reflective_loader/analysis_options.yaml | 2 +- pkgs/test_reflective_loader/pubspec.yaml | 7 ++++--- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/test_reflective_loader/.gitignore b/pkgs/test_reflective_loader/.gitignore index 67a390f24..2a2c2612b 100644 --- a/pkgs/test_reflective_loader/.gitignore +++ b/pkgs/test_reflective_loader/.gitignore @@ -1,6 +1,7 @@ .buildlog .DS_Store .idea +.dart_tool/ .pub/ .project .settings/ diff --git a/pkgs/test_reflective_loader/.travis.yml b/pkgs/test_reflective_loader/.travis.yml index 9c3a39f97..99c700e11 100644 --- a/pkgs/test_reflective_loader/.travis.yml +++ b/pkgs/test_reflective_loader/.travis.yml @@ -1,2 +1,3 @@ language: dart +dart: [dev, stable, 1.24.3] script: ./tool/travis.sh diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 6e5b8519c..ade68b1a3 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,4 +1,6 @@ -# Changelog +## 0.1.5 + +- Set max SDK version to `<3.0.0`, and adjust other dependencies. ## 0.1.3 diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml index 5f425e0e1..180004e7c 100644 --- a/pkgs/test_reflective_loader/analysis_options.yaml +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -1,5 +1,5 @@ analyzer: - strong-mode: true + linter: rules: - always_declare_return_types diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index ae718e8fd..392e498b6 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,11 +1,12 @@ name: test_reflective_loader -version: 0.1.4 +version: 0.1.5 + description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: - sdk: '>=1.8.0 <2.0.0' + sdk: '>=1.8.0 <3.0.0' dependencies: - test: ^0.12.0 + test: '>=0.12.0 <2.0.0' From 787021153824348c19b559ac0f6e534b659e3c63 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Fri, 20 Jul 2018 14:47:22 -0700 Subject: [PATCH 20/81] Make FailingTest public. --- pkgs/test_reflective_loader/CHANGELOG.md | 5 ++++ .../lib/test_reflective_loader.dart | 26 +++++++++---------- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index ade68b1a3..843021950 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.6 + +- Make `FailingTest` public, with the URI of the issue that causes + the test to break. + ## 0.1.5 - Set max SDK version to `<3.0.0`, and adjust other dependencies. diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 9f2478f77..efefaa638 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -21,7 +21,7 @@ const _AssertFailingTest assertFailingTest = const _AssertFailingTest(); * A marker annotation used to annotate overridden test methods (so we cannot * rename them to `fail_`) which are expected to fail. */ -const _FailingTest failingTest = const _FailingTest(); +const FailingTest failingTest = const FailingTest(null); /** * A marker annotation used to instruct dart2js to keep reflection information @@ -267,11 +267,11 @@ Future _runTest(ClassMirror classMirror, Symbol symbol) { typedef dynamic _TestFunction(); /** - * A marker annotation used to instruct dart2js to keep reflection information - * for the annotated classes. + * A marker annotation used to annotate overridden test methods (so we cannot + * rename them to `fail_`) which are expected to fail. */ -class _ReflectiveTest { - const _ReflectiveTest(); +class FailingTest { + const FailingTest(String issueUri); } /** @@ -293,14 +293,6 @@ class _AssertFailingTest { const _AssertFailingTest(); } -/** - * A marker annotation used to annotate overridden test methods (so we cannot - * rename them to `fail_`) which are expected to fail. - */ -class _FailingTest { - const _FailingTest(); -} - /** * Information about a type based test group. */ @@ -321,6 +313,14 @@ class _Group { } } +/** + * A marker annotation used to instruct dart2js to keep reflection information + * for the annotated classes. + */ +class _ReflectiveTest { + const _ReflectiveTest(); +} + /** * A marker annotation used to annotate "solo" groups and tests. */ diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 392e498b6..dd6090ebb 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.5 +version: 0.1.6 description: Support for discovering tests and test suites using reflection. author: Dart Team From 870ad666f7ced0de2bebf387a132c3f1833ffeab Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Fri, 20 Jul 2018 18:27:45 -0700 Subject: [PATCH 21/81] Update comments (dart-lang/test_reflective_loader#20) --- pkgs/test_reflective_loader/CHANGELOG.md | 5 ++++ .../lib/test_reflective_loader.dart | 29 ++++++++++--------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 843021950..e9a5ee6ec 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.7 + +- Update documentation comments. +- Remove `@MirrorsUsed` annotation on `dart:mirrors`. + ## 0.1.6 - Make `FailingTest` public, with the URI of the issue that causes diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index efefaa638..5667fe342 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -5,21 +5,18 @@ library test_reflective_loader; import 'dart:async'; -@MirrorsUsed(metaTargets: 'ReflectiveTest') import 'dart:mirrors'; import 'package:test/test.dart' as test_package; /** - * A marker annotation used to annotate overridden test methods (so we cannot - * rename them to `fail_`) which are expected to fail at `assert` in the - * checked mode. + * A marker annotation used to annotate test methods which are expected to fail + * when asserts are enabled. */ const _AssertFailingTest assertFailingTest = const _AssertFailingTest(); /** - * A marker annotation used to annotate overridden test methods (so we cannot - * rename them to `fail_`) which are expected to fail. + * A marker annotation used to annotate test methods which are expected to fail. */ const FailingTest failingTest = const FailingTest(null); @@ -267,10 +264,12 @@ Future _runTest(ClassMirror classMirror, Symbol symbol) { typedef dynamic _TestFunction(); /** - * A marker annotation used to annotate overridden test methods (so we cannot - * rename them to `fail_`) which are expected to fail. + * A marker annotation used to annotate test methods which are expected to fail. */ class FailingTest { + /** + * Initialize this annotation with the given issue URI. + */ const FailingTest(String issueUri); } @@ -279,15 +278,17 @@ class FailingTest { * information. */ class TestTimeout { - final test_package.Timeout timeout; + final test_package.Timeout _timeout; - const TestTimeout(this.timeout); + /** + * Initialize this annotation with the given timeout. + */ + const TestTimeout(test_package.Timeout timeout) : _timeout = timeout; } /** - * A marker annotation used to annotate overridden test methods (so we cannot - * rename them to `fail_`) which are expected to fail at `assert` in the - * checked mode. + * A marker annotation used to annotate test methods which are expected to fail + * when asserts are enabled. */ class _AssertFailingTest { const _AssertFailingTest(); @@ -309,7 +310,7 @@ class _Group { _TestFunction function) { String fullName = _combineNames(this.name, name); TestTimeout timeout = _getAnnotationInstance(memberMirror, TestTimeout); - tests.add(new _Test(isSolo, fullName, function, timeout?.timeout)); + tests.add(new _Test(isSolo, fullName, function, timeout?._timeout)); } } From 8f4e1944c5c37e6bded0bf75eddcd2fd2d9a575c Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Fri, 20 Jul 2018 18:36:09 -0700 Subject: [PATCH 22/81] Update pubspec.yaml version. (dart-lang/test_reflective_loader#21) --- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index dd6090ebb..b4f1781ed 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.6 +version: 0.1.7 description: Support for discovering tests and test suites using reflection. author: Dart Team From 6f98f8aa573e974885a03767917d21c24793a9ec Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Thu, 26 Jul 2018 12:05:37 -0700 Subject: [PATCH 23/81] Add 'issue' and 'reason' parameters to FailingTest. (dart-lang/test_reflective_loader#23) --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ .../lib/test_reflective_loader.dart | 9 ++++++--- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index e9a5ee6ec..b6121a198 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.8 + +- Update `FailingTest` to add named parameters `issue` and `reason`. + ## 0.1.7 - Update documentation comments. diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 5667fe342..25868d9ca 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -18,7 +18,7 @@ const _AssertFailingTest assertFailingTest = const _AssertFailingTest(); /** * A marker annotation used to annotate test methods which are expected to fail. */ -const FailingTest failingTest = const FailingTest(null); +const FailingTest failingTest = const FailingTest(); /** * A marker annotation used to instruct dart2js to keep reflection information @@ -268,9 +268,12 @@ typedef dynamic _TestFunction(); */ class FailingTest { /** - * Initialize this annotation with the given issue URI. + * Initialize this annotation with the given arguments. + * + * [issue] is a full URI describing the failure and used for tracking. + * [reason] is a free form textual description. */ - const FailingTest(String issueUri); + const FailingTest({String issue, String reason}); } /** diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index b4f1781ed..3f399eab0 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.7 +version: 0.1.8 description: Support for discovering tests and test suites using reflection. author: Dart Team From d30eec77a19ca16bc24fc455742debbae02c9ac7 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 31 Jul 2019 21:06:13 -0700 Subject: [PATCH 24/81] Delete codereview.settings --- pkgs/test_reflective_loader/codereview.settings | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 pkgs/test_reflective_loader/codereview.settings diff --git a/pkgs/test_reflective_loader/codereview.settings b/pkgs/test_reflective_loader/codereview.settings deleted file mode 100644 index 3ba713c75..000000000 --- a/pkgs/test_reflective_loader/codereview.settings +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by gcl to get repository specific information. -CODE_REVIEW_SERVER: http://codereview.chromium.org -VIEW_VC: https://github.com/dart-lang/test_reflective_loader/commit/ -CC_LIST: reviews@dartlang.org From 964693d7c56ecfe9f307fbd53a99acecb2886f97 Mon Sep 17 00:00:00 2001 From: Mike Fairhurst Date: Mon, 30 Sep 2019 11:53:12 -0700 Subject: [PATCH 25/81] Add support for skipping tests --- .../lib/test_reflective_loader.dart | 61 ++++++++++++++++--- .../test/test_reflective_loader_test.dart | 10 +++ 2 files changed, 61 insertions(+), 10 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 25868d9ca..4312ba5c5 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -26,6 +26,11 @@ const FailingTest failingTest = const FailingTest(); */ const _ReflectiveTest reflectiveTest = const _ReflectiveTest(); +/** + * A marker annotation used to annotate test methods that should be skipped. + */ +const SkippedTest skippedTest = const SkippedTest(); + /** * A marker annotation used to annotate "solo" groups and tests. */ @@ -115,14 +120,18 @@ void defineReflectiveTests(Type type) { _hasAnnotationInstance(memberMirror, soloTest); // test_ if (memberName.startsWith('test_')) { - group.addTest(isSolo, memberName, memberMirror, () { - if (_hasFailingTestAnnotation(memberMirror) || - _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { - return _runFailingTest(classMirror, symbol); - } else { - return _runTest(classMirror, symbol); - } - }); + if (_hasSkippedTestAnnotation(memberMirror)) { + group.addSkippedTest(memberName); + } else { + group.addTest(isSolo, memberName, memberMirror, () { + if (_hasFailingTestAnnotation(memberMirror) || + _isCheckedMode && _hasAssertFailingTestAnnotation(memberMirror)) { + return _runFailingTest(classMirror, symbol); + } else { + return _runTest(classMirror, symbol); + } + }); + } return; } // solo_test_ @@ -143,6 +152,10 @@ void defineReflectiveTests(Type type) { return _runFailingTest(classMirror, symbol); }); } + // skip_test_ + if (memberName.startsWith('skip_test_')) { + group.addSkippedTest(memberName); + } }); // Support for the case of missing enclosing [defineReflectiveSuite]. @@ -160,7 +173,7 @@ void _addTestsIfTopLevelSuite() { for (_Test test in group.tests) { if (allTests || test.isSolo) { test_package.test(test.name, test.function, - timeout: test.timeout); + timeout: test.timeout, skip: test.isSkipped); } } } @@ -211,6 +224,9 @@ bool _hasAssertFailingTestAnnotation(MethodMirror method) => bool _hasFailingTestAnnotation(MethodMirror method) => _hasAnnotationInstance(method, failingTest); +bool _hasSkippedTestAnnotation(MethodMirror method) => + _hasAnnotationInstance(method, skippedTest); + Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { var invocationResult = null; InstanceMirror closure; @@ -276,6 +292,19 @@ class FailingTest { const FailingTest({String issue, String reason}); } +/** + * A marker annotation used to annotate test methods which are skipped. + */ +class SkippedTest { + /** + * Initialize this annotation with the given arguments. + * + * [issue] is a full URI describing the failure and used for tracking. + * [reason] is a free form textual description. + */ + const SkippedTest({String issue, String reason}); +} + /** * A marker annotation used to annotate test methods with additional timeout * information. @@ -309,6 +338,11 @@ class _Group { bool get hasSoloTest => tests.any((test) => test.isSolo); + void addSkippedTest(String name) { + String fullName = _combineNames(this.name, name); + tests.add(new _Test.skipped(isSolo, fullName)); + } + void addTest(bool isSolo, String name, MethodMirror memberMirror, _TestFunction function) { String fullName = _combineNames(this.name, name); @@ -341,5 +375,12 @@ class _Test { final _TestFunction function; final test_package.Timeout timeout; - _Test(this.isSolo, this.name, this.function, this.timeout); + final bool isSkipped; + + _Test(this.isSolo, this.name, this.function, this.timeout) + : isSkipped = false; + _Test.skipped(this.isSolo, this.name) + : isSkipped = true, + function = null, + timeout = null; } diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index 952fe0a1d..a657b0477 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -35,4 +35,14 @@ class TestReflectiveLoaderTest { Future test_fails_throws_async() { return new Future.error('foo'); } + + @skippedTest + void test_fails_but_skipped() { + throw 'foo'; + } + + @skippedTest + void test_times_out_but_skipped() { + while (true) {} + } } From e7b823436d851452f6167b806412f00e8bb3a79b Mon Sep 17 00:00:00 2001 From: Mike Fairhurst Date: Mon, 30 Sep 2019 13:56:08 -0700 Subject: [PATCH 26/81] Feedback from Konstantin --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 4312ba5c5..6430c6676 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -379,6 +379,7 @@ class _Test { _Test(this.isSolo, this.name, this.function, this.timeout) : isSkipped = false; + _Test.skipped(this.isSolo, this.name) : isSkipped = true, function = null, From 24782ed0637007761af0ca3f6ae779fd55d5a62b Mon Sep 17 00:00:00 2001 From: Mike Fairhurst Date: Mon, 30 Sep 2019 14:05:02 -0700 Subject: [PATCH 27/81] prep publish 1.9 --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ pkgs/test_reflective_loader/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index b6121a198..616d02194 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.9 + +- Add `@SkippedTest` annotation and `skip_test` prefix. + ## 0.1.8 - Update `FailingTest` to add named parameters `issue` and `reason`. diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 3f399eab0..8cfc3fa6f 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.1.8 +version: 0.1.9 description: Support for discovering tests and test suites using reflection. author: Dart Team From 5a4d85a5be57ad3a31e7f47fc5252d500352f802 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 30 Oct 2020 18:44:31 -0700 Subject: [PATCH 28/81] add support for github actions --- .../.github/workflows/build.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/test_reflective_loader/.github/workflows/build.yaml diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml new file mode 100644 index 000000000..4d33943d7 --- /dev/null +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -0,0 +1,29 @@ +name: Dart + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + container: + image: google/dart:beta + + steps: + - uses: actions/checkout@v2 + + - name: pub get + run: pub get + + - name: dart format + run: dart format --output=none --set-exit-if-changed . + + - name: dart analyze + run: dart analyze + + - name: dart test + run: dart test From dfb474bd54e6e446d9da6099d76f90491b3dff41 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sat, 31 Oct 2020 15:16:28 -0700 Subject: [PATCH 29/81] remove travis support --- pkgs/test_reflective_loader/.travis.yml | 3 --- pkgs/test_reflective_loader/README.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 pkgs/test_reflective_loader/.travis.yml diff --git a/pkgs/test_reflective_loader/.travis.yml b/pkgs/test_reflective_loader/.travis.yml deleted file mode 100644 index 99c700e11..000000000 --- a/pkgs/test_reflective_loader/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: dart -dart: [dev, stable, 1.24.3] -script: ./tool/travis.sh diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index 66dca98c2..46558b006 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -1,6 +1,6 @@ # test_reflective_loader -[![Build Status](https://travis-ci.org/dart-lang/test_reflective_loader.svg?branch=master)](https://travis-ci.org/dart-lang/test_reflective_loader) +[![Build Status](![Dart](https://github.com/dart-lang/test_reflective_loader/workflows/Dart/badge.svg))](https://github.com/dart-lang/test_reflective_loader/actions) Support for discovering tests and test suites using reflection. From f6b04f353f0aba90a7cbb907f8ad1d3bfc6b5d56 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sat, 31 Oct 2020 21:38:17 -0700 Subject: [PATCH 30/81] Update README.md --- pkgs/test_reflective_loader/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index 46558b006..b7f5e19a7 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -1,6 +1,6 @@ # test_reflective_loader -[![Build Status](![Dart](https://github.com/dart-lang/test_reflective_loader/workflows/Dart/badge.svg))](https://github.com/dart-lang/test_reflective_loader/actions) +[![Build Status](https://github.com/dart-lang/test_reflective_loader/workflows/Dart/badge.svg)](https://github.com/dart-lang/test_reflective_loader/actions) Support for discovering tests and test suites using reflection. From 048ac64a67176ce2fbefc3deb93a9bc88d550c7c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 13 Nov 2020 13:13:02 -0800 Subject: [PATCH 31/81] Setup weekly cron on Github workflow (dart-lang/test_reflective_loader#29) --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 4d33943d7..2ac752518 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -5,6 +5,9 @@ on: push: branches: - master + schedule: + # “At 00:00 (UTC) on Sunday.” + - cron: '0 0 * * 0' jobs: build: From 1520964c63adbec217cc1d0d905a7e05b3d99d21 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 2 Dec 2020 22:01:00 -0800 Subject: [PATCH 32/81] Migrate to nullsafety --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++ .../lib/test_reflective_loader.dart | 44 +++++++++---------- pkgs/test_reflective_loader/pubspec.yaml | 4 +- .../test/test_reflective_loader_test.dart | 2 - 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 616d02194..7efa79cda 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0-nullsafety.0 + +- Migrate to the null safety language feature. + ## 0.1.9 - Add `@SkippedTest` annotation and `skip_test` prefix. diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 6430c6676..04caa51fd 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -38,7 +38,7 @@ const _SoloTest soloTest = const _SoloTest(); final List<_Group> _currentGroups = <_Group>[]; int _currentSuiteLevel = 0; -String _currentSuiteName = null; +String? _currentSuiteName = null; /** * Is `true` the application is running in the checked mode. @@ -58,8 +58,8 @@ final bool _isCheckedMode = () { * create embedded suites. If the current suite is the top-level one, perform * check for "solo" groups and tests, and run all or only "solo" items. */ -void defineReflectiveSuite(void define(), {String name}) { - String groupName = _currentSuiteName; +void defineReflectiveSuite(void define(), {String? name}) { + String? groupName = _currentSuiteName; _currentSuiteLevel++; try { _currentSuiteName = _combineNames(_currentSuiteName, name); @@ -167,13 +167,13 @@ void defineReflectiveTests(Type type) { */ void _addTestsIfTopLevelSuite() { if (_currentSuiteLevel == 0) { - void runTests({bool allGroups, bool allTests}) { + void runTests({/*required*/ required bool allGroups, /*required*/ required bool allTests}) { for (_Group group in _currentGroups) { if (allGroups || group.isSolo) { for (_Test test in group.tests) { if (allTests || test.isSolo) { - test_package.test(test.name, test.function, - timeout: test.timeout, skip: test.isSkipped); + test_package.test(test.name, test.function!, + timeout: test.timeout!, skip: test.isSkipped); } } } @@ -195,7 +195,7 @@ void _addTestsIfTopLevelSuite() { * Return the combination of the [base] and [addition] names. * If any other two is `null`, then the other one is returned. */ -String _combineNames(String base, String addition) { +String? _combineNames(String? base, String? addition) { if (base == null) { return addition; } else if (addition == null) { @@ -205,7 +205,7 @@ String _combineNames(String base, String addition) { } } -Object _getAnnotationInstance(DeclarationMirror declaration, Type type) { +Object? _getAnnotationInstance(DeclarationMirror declaration, Type type) { for (InstanceMirror annotation in declaration.metadata) { if (annotation.reflectee.runtimeType == type) { return annotation.reflectee; @@ -227,9 +227,9 @@ bool _hasFailingTestAnnotation(MethodMirror method) => bool _hasSkippedTestAnnotation(MethodMirror method) => _hasAnnotationInstance(method, skippedTest); -Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { - var invocationResult = null; - InstanceMirror closure; +Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { + Object? invocationResult = null; + InstanceMirror? closure; try { closure = instanceMirror.getField(symbol); } on NoSuchMethodError {} @@ -248,7 +248,7 @@ Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { * - The test returns a future which completes with an error. * - An exception is thrown to the zone handler from a timer task. */ -Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { +Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { bool passed = false; return runZoned(() { return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { @@ -270,7 +270,7 @@ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { }); } -Future _runTest(ClassMirror classMirror, Symbol symbol) { +Future _runTest(ClassMirror classMirror, Symbol symbol) { InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); return _invokeSymbolIfExists(instanceMirror, #setUp) .then((_) => instanceMirror.invoke(symbol, []).reflectee) @@ -289,7 +289,7 @@ class FailingTest { * [issue] is a full URI describing the failure and used for tracking. * [reason] is a free form textual description. */ - const FailingTest({String issue, String reason}); + const FailingTest({String? issue, String? reason}); } /** @@ -302,7 +302,7 @@ class SkippedTest { * [issue] is a full URI describing the failure and used for tracking. * [reason] is a free form textual description. */ - const SkippedTest({String issue, String reason}); + const SkippedTest({String? issue, String? reason}); } /** @@ -331,7 +331,7 @@ class _AssertFailingTest { */ class _Group { final bool isSolo; - final String name; + final String? name; final List<_Test> tests = <_Test>[]; _Group(this.isSolo, this.name); @@ -339,14 +339,14 @@ class _Group { bool get hasSoloTest => tests.any((test) => test.isSolo); void addSkippedTest(String name) { - String fullName = _combineNames(this.name, name); + String? fullName = _combineNames(this.name, name); tests.add(new _Test.skipped(isSolo, fullName)); } void addTest(bool isSolo, String name, MethodMirror memberMirror, _TestFunction function) { - String fullName = _combineNames(this.name, name); - TestTimeout timeout = _getAnnotationInstance(memberMirror, TestTimeout); + String? fullName = _combineNames(this.name, name); + var timeout = _getAnnotationInstance(memberMirror, TestTimeout) as TestTimeout?; tests.add(new _Test(isSolo, fullName, function, timeout?._timeout)); } } @@ -371,9 +371,9 @@ class _SoloTest { */ class _Test { final bool isSolo; - final String name; - final _TestFunction function; - final test_package.Timeout timeout; + final String? name; + final _TestFunction? function; + final test_package.Timeout? timeout; final bool isSkipped; diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 8cfc3fa6f..75df05f52 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,12 +1,12 @@ name: test_reflective_loader -version: 0.1.9 +version: 0.2.0-nullsafety.0 description: Support for discovering tests and test suites using reflection. author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: - sdk: '>=1.8.0 <3.0.0' + sdk: '>=2.12.0-0 <3.0.0' dependencies: test: '>=0.12.0 <2.0.0' diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index a657b0477..2c69ccebd 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -15,8 +15,6 @@ void main() { @reflectiveTest class TestReflectiveLoaderTest { - String pathname; - void test_passes() { expect(true, true); } From 9a7c70e4a6a8bcee97890cbb70cff071f51f1582 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 2 Dec 2020 22:02:00 -0800 Subject: [PATCH 33/81] nit --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 04caa51fd..dea1b16c7 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -167,7 +167,7 @@ void defineReflectiveTests(Type type) { */ void _addTestsIfTopLevelSuite() { if (_currentSuiteLevel == 0) { - void runTests({/*required*/ required bool allGroups, /*required*/ required bool allTests}) { + void runTests({required bool allGroups, required bool allTests}) { for (_Group group in _currentGroups) { if (allGroups || group.isSolo) { for (_Test test in group.tests) { From b5b95d879cf74070132df3f94034b02884d8e59d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 2 Dec 2020 22:02:11 -0800 Subject: [PATCH 34/81] fmt --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index dea1b16c7..98b66ad84 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -227,7 +227,8 @@ bool _hasFailingTestAnnotation(MethodMirror method) => bool _hasSkippedTestAnnotation(MethodMirror method) => _hasAnnotationInstance(method, skippedTest); -Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { +Future _invokeSymbolIfExists( + InstanceMirror instanceMirror, Symbol symbol) { Object? invocationResult = null; InstanceMirror? closure; try { @@ -346,7 +347,8 @@ class _Group { void addTest(bool isSolo, String name, MethodMirror memberMirror, _TestFunction function) { String? fullName = _combineNames(this.name, name); - var timeout = _getAnnotationInstance(memberMirror, TestTimeout) as TestTimeout?; + var timeout = + _getAnnotationInstance(memberMirror, TestTimeout) as TestTimeout?; tests.add(new _Test(isSolo, fullName, function, timeout?._timeout)); } } From 296db46cf7c5594a16d53d17461eff321030dc0b Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Thu, 3 Dec 2020 11:10:21 -0800 Subject: [PATCH 35/81] Feedback; much less nullable --- .../lib/test_reflective_loader.dart | 32 +++++++++---------- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 98b66ad84..71d436648 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -38,7 +38,7 @@ const _SoloTest soloTest = const _SoloTest(); final List<_Group> _currentGroups = <_Group>[]; int _currentSuiteLevel = 0; -String? _currentSuiteName = null; +String _currentSuiteName = ''; /** * Is `true` the application is running in the checked mode. @@ -58,8 +58,8 @@ final bool _isCheckedMode = () { * create embedded suites. If the current suite is the top-level one, perform * check for "solo" groups and tests, and run all or only "solo" items. */ -void defineReflectiveSuite(void define(), {String? name}) { - String? groupName = _currentSuiteName; +void defineReflectiveSuite(void define(), {String name = ''}) { + String groupName = _currentSuiteName; _currentSuiteLevel++; try { _currentSuiteName = _combineNames(_currentSuiteName, name); @@ -172,8 +172,8 @@ void _addTestsIfTopLevelSuite() { if (allGroups || group.isSolo) { for (_Test test in group.tests) { if (allTests || test.isSolo) { - test_package.test(test.name, test.function!, - timeout: test.timeout!, skip: test.isSkipped); + test_package.test(test.name, test.function, + timeout: test.timeout, skip: test.isSkipped); } } } @@ -195,10 +195,10 @@ void _addTestsIfTopLevelSuite() { * Return the combination of the [base] and [addition] names. * If any other two is `null`, then the other one is returned. */ -String? _combineNames(String? base, String? addition) { - if (base == null) { +String _combineNames(String base, String addition) { + if (base.isEmpty) { return addition; - } else if (addition == null) { + } else if (addition.isEmpty) { return base; } else { return '$base | $addition'; @@ -249,7 +249,7 @@ Future _invokeSymbolIfExists( * - The test returns a future which completes with an error. * - An exception is thrown to the zone handler from a timer task. */ -Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { +Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { bool passed = false; return runZoned(() { return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { @@ -271,7 +271,7 @@ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { }); } -Future _runTest(ClassMirror classMirror, Symbol symbol) { +Future _runTest(ClassMirror classMirror, Symbol symbol) { InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); return _invokeSymbolIfExists(instanceMirror, #setUp) .then((_) => instanceMirror.invoke(symbol, []).reflectee) @@ -332,7 +332,7 @@ class _AssertFailingTest { */ class _Group { final bool isSolo; - final String? name; + final String name; final List<_Test> tests = <_Test>[]; _Group(this.isSolo, this.name); @@ -340,13 +340,13 @@ class _Group { bool get hasSoloTest => tests.any((test) => test.isSolo); void addSkippedTest(String name) { - String? fullName = _combineNames(this.name, name); + var fullName = _combineNames(this.name, name); tests.add(new _Test.skipped(isSolo, fullName)); } void addTest(bool isSolo, String name, MethodMirror memberMirror, _TestFunction function) { - String? fullName = _combineNames(this.name, name); + var fullName = _combineNames(this.name, name); var timeout = _getAnnotationInstance(memberMirror, TestTimeout) as TestTimeout?; tests.add(new _Test(isSolo, fullName, function, timeout?._timeout)); @@ -373,8 +373,8 @@ class _SoloTest { */ class _Test { final bool isSolo; - final String? name; - final _TestFunction? function; + final String name; + final _TestFunction function; final test_package.Timeout? timeout; final bool isSkipped; @@ -384,6 +384,6 @@ class _Test { _Test.skipped(this.isSolo, this.name) : isSkipped = true, - function = null, + function = (() {}), timeout = null; } diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 75df05f52..6d081e48d 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -9,4 +9,4 @@ environment: sdk: '>=2.12.0-0 <3.0.0' dependencies: - test: '>=0.12.0 <2.0.0' + test: '>=1.16.0-nullsafety.12 <2.0.0' From 3810364bd1d1d9b7f7d1fd350162225bc8736b32 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Thu, 3 Dec 2020 15:46:41 -0800 Subject: [PATCH 36/81] Use runZonedGuarded --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 71d436648..cfd738db4 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -249,9 +249,9 @@ Future _invokeSymbolIfExists( * - The test returns a future which completes with an error. * - An exception is thrown to the zone handler from a timer task. */ -Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { +Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { bool passed = false; - return runZoned(() { + return runZonedGuarded(() { return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { passed = true; test_package.fail('Test passed - expected to fail.'); @@ -262,7 +262,7 @@ Future _runFailingTest(ClassMirror classMirror, Symbol symbol) { } // otherwise, an exception is not a failure for _runFailingTest }); - }, onError: (e) { + }, (e, st) { // if passed, and we call fail(), rethrow this exception if (passed) { throw e; From bcfa4c6e941e9304ef71642c2328553659b97290 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Thu, 3 Dec 2020 16:22:19 -0800 Subject: [PATCH 37/81] Fix test --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index cfd738db4..3528a43f3 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -252,7 +252,7 @@ Future _invokeSymbolIfExists( Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { bool passed = false; return runZonedGuarded(() { - return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { + return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { passed = true; test_package.fail('Test passed - expected to fail.'); }).catchError((e) { From 0b72f1c2d2b2d490fdeb29410dd63e49f47e1034 Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Mon, 8 Feb 2021 13:42:55 -0800 Subject: [PATCH 38/81] stable null safety release (dart-lang/test_reflective_loader#31) * stable null safety release * Remove author. --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ pkgs/test_reflective_loader/pubspec.yaml | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 7efa79cda..bb0f5ab88 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 + +- Stable null safety release. + ## 0.2.0-nullsafety.0 - Migrate to the null safety language feature. diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 6d081e48d..fcdf6b745 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,8 +1,7 @@ name: test_reflective_loader -version: 0.2.0-nullsafety.0 +version: 0.2.0 description: Support for discovering tests and test suites using reflection. -author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: From 1a84a1ea7d6aaac817bf6534feb46b6c10ee689e Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Mon, 8 Feb 2021 13:49:51 -0800 Subject: [PATCH 39/81] Revert "stable null safety release (dart-lang/test_reflective_loader#31)" (dart-lang/test_reflective_loader#32) This reverts commit 0b72f1c2d2b2d490fdeb29410dd63e49f47e1034. --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ---- pkgs/test_reflective_loader/pubspec.yaml | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index bb0f5ab88..7efa79cda 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.2.0 - -- Stable null safety release. - ## 0.2.0-nullsafety.0 - Migrate to the null safety language feature. diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index fcdf6b745..6d081e48d 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,7 +1,8 @@ name: test_reflective_loader -version: 0.2.0 +version: 0.2.0-nullsafety.0 description: Support for discovering tests and test suites using reflection. +author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: From 7c4cefac88b168ce5af03cc0c716323a23c3ff30 Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Mon, 8 Feb 2021 16:43:13 -0800 Subject: [PATCH 40/81] stable null safety release (dart-lang/test_reflective_loader#33) --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ pkgs/test_reflective_loader/pubspec.yaml | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 7efa79cda..bb0f5ab88 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 + +- Stable null safety release. + ## 0.2.0-nullsafety.0 - Migrate to the null safety language feature. diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 6d081e48d..1a727331e 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,12 +1,11 @@ name: test_reflective_loader -version: 0.2.0-nullsafety.0 +version: 0.2.0 description: Support for discovering tests and test suites using reflection. -author: Dart Team homepage: https://github.com/dart-lang/test_reflective_loader environment: sdk: '>=2.12.0-0 <3.0.0' dependencies: - test: '>=1.16.0-nullsafety.12 <2.0.0' + test: '>=1.16.0 <2.0.0' From a9a289f7cf6a5561ef626c7f777801fbaee4b6e2 Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Fri, 2 Apr 2021 16:46:52 -0700 Subject: [PATCH 41/81] Update LICENSE Changes to comply with internal review --- pkgs/test_reflective_loader/LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/LICENSE b/pkgs/test_reflective_loader/LICENSE index de31e1a0a..633672ab3 100644 --- a/pkgs/test_reflective_loader/LICENSE +++ b/pkgs/test_reflective_loader/LICENSE @@ -1,4 +1,5 @@ -Copyright 2015, the Dart project authors. All rights reserved. +Copyright 2015, the Dart project authors. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +10,7 @@ met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From ddc0e4346cf52dc04bb7c573cb90eaa582ed3ca5 Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Wed, 1 Sep 2021 14:31:11 -0600 Subject: [PATCH 42/81] Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE (dart-lang/test_reflective_loader#36) --- pkgs/test_reflective_loader/lib/test_reflective_loader.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 3528a43f3..fe78b9de8 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -111,7 +111,7 @@ void defineReflectiveTests(Type type) { classMirror.instanceMembers .forEach((Symbol symbol, MethodMirror memberMirror) { // we need only methods - if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) { + if (!memberMirror.isRegularMethod) { return; } // prepare information about the method From 0b51a2dbed8c4c17d01811a395fd00de55125453 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 17 Jan 2022 16:13:22 +0100 Subject: [PATCH 43/81] Remove stale travis job --- pkgs/test_reflective_loader/tool/travis.sh | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100755 pkgs/test_reflective_loader/tool/travis.sh diff --git a/pkgs/test_reflective_loader/tool/travis.sh b/pkgs/test_reflective_loader/tool/travis.sh deleted file mode 100755 index ea0f1c495..000000000 --- a/pkgs/test_reflective_loader/tool/travis.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - -# Fast fail the script on failures. -set -e - -# Verify that the libraries are error free. -dartanalyzer --fatal-warnings \ - lib/test_reflective_loader.dart \ - test/test_reflective_loader_test.dart - -# Run the tests. -dart test/test_reflective_loader_test.dart From ccf576ef2b52dfecb4fb70557b74a365a67856b4 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 29 Apr 2022 22:17:28 -0700 Subject: [PATCH 44/81] populate the pubspec repository field (dart-lang/test_reflective_loader#39) populate the pubspec repository field dart-lang/test_reflective_loader#39 --- pkgs/test_reflective_loader/CHANGELOG.md | 5 +++++ pkgs/test_reflective_loader/analysis_options.yaml | 2 +- .../lib/test_reflective_loader.dart | 2 +- pkgs/test_reflective_loader/pubspec.yaml | 8 ++++---- .../test/test_reflective_loader_test.dart | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index bb0f5ab88..039585882 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.1-dev + +- Use package:lints for analysis. +- Populate the pubspec `repository` field. + ## 0.2.0 - Stable null safety release. diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml index 180004e7c..31466c374 100644 --- a/pkgs/test_reflective_loader/analysis_options.yaml +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -1,4 +1,4 @@ -analyzer: +include: package:lints/core.yaml linter: rules: diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index fe78b9de8..e03eb7afb 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -278,7 +278,7 @@ Future _runTest(ClassMirror classMirror, Symbol symbol) { .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); } -typedef dynamic _TestFunction(); +typedef _TestFunction = dynamic Function(); /** * A marker annotation used to annotate test methods which are expected to fail. diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 1a727331e..51cb753ac 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,11 +1,11 @@ name: test_reflective_loader -version: 0.2.0 - +version: 0.2.1-dev description: Support for discovering tests and test suites using reflection. -homepage: https://github.com/dart-lang/test_reflective_loader +repository: https://github.com/dart-lang/test_reflective_loader environment: - sdk: '>=2.12.0-0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: + lints: ^1.0.0 test: '>=1.16.0 <2.0.0' diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index 2c69ccebd..d303a75ba 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: non_constant_identifier_names + import 'dart:async'; import 'package:test/test.dart'; From 3e2beca4db9468e99e999d36f806cecfb557ba4e Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 19 May 2022 09:23:22 -0700 Subject: [PATCH 45/81] prep to publish 0.2.1 (dart-lang/test_reflective_loader#40) prep to publish 0.2.1 --- pkgs/test_reflective_loader/.status | 4 --- pkgs/test_reflective_loader/CHANGELOG.md | 2 +- pkgs/test_reflective_loader/README.md | 3 +- .../analysis_options.yaml | 6 +++- .../lib/test_reflective_loader.dart | 33 ++++++++++--------- pkgs/test_reflective_loader/pubspec.yaml | 4 +-- .../test/test_reflective_loader_test.dart | 2 +- 7 files changed, 28 insertions(+), 26 deletions(-) delete mode 100644 pkgs/test_reflective_loader/.status diff --git a/pkgs/test_reflective_loader/.status b/pkgs/test_reflective_loader/.status deleted file mode 100644 index 364ca4b46..000000000 --- a/pkgs/test_reflective_loader/.status +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 039585882..05195a8f4 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.2.1-dev +## 0.2.1 - Use package:lints for analysis. - Populate the pubspec `repository` field. diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index b7f5e19a7..f7d07dbe3 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -1,6 +1,5 @@ -# test_reflective_loader - [![Build Status](https://github.com/dart-lang/test_reflective_loader/workflows/Dart/badge.svg)](https://github.com/dart-lang/test_reflective_loader/actions) +[![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader) Support for discovering tests and test suites using reflection. diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml index 31466c374..fc2a9d30e 100644 --- a/pkgs/test_reflective_loader/analysis_options.yaml +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -1,4 +1,8 @@ -include: package:lints/core.yaml +include: package:lints/recommended.yaml + +analyzer: + errors: + slash_for_doc_comments: ignore linter: rules: diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index e03eb7afb..6237f676c 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -13,28 +13,28 @@ import 'package:test/test.dart' as test_package; * A marker annotation used to annotate test methods which are expected to fail * when asserts are enabled. */ -const _AssertFailingTest assertFailingTest = const _AssertFailingTest(); +const _AssertFailingTest assertFailingTest = _AssertFailingTest(); /** * A marker annotation used to annotate test methods which are expected to fail. */ -const FailingTest failingTest = const FailingTest(); +const FailingTest failingTest = FailingTest(); /** * A marker annotation used to instruct dart2js to keep reflection information * for the annotated classes. */ -const _ReflectiveTest reflectiveTest = const _ReflectiveTest(); +const _ReflectiveTest reflectiveTest = _ReflectiveTest(); /** * A marker annotation used to annotate test methods that should be skipped. */ -const SkippedTest skippedTest = const SkippedTest(); +const SkippedTest skippedTest = SkippedTest(); /** * A marker annotation used to annotate "solo" groups and tests. */ -const _SoloTest soloTest = const _SoloTest(); +const _SoloTest soloTest = _SoloTest(); final List<_Group> _currentGroups = <_Group>[]; int _currentSuiteLevel = 0; @@ -58,7 +58,7 @@ final bool _isCheckedMode = () { * create embedded suites. If the current suite is the top-level one, perform * check for "solo" groups and tests, and run all or only "solo" items. */ -void defineReflectiveSuite(void define(), {String name = ''}) { +void defineReflectiveSuite(void Function() define, {String name = ''}) { String groupName = _currentSuiteName; _currentSuiteLevel++; try { @@ -96,7 +96,7 @@ void defineReflectiveTests(Type type) { if (!classMirror.metadata.any((InstanceMirror annotation) => annotation.type.reflectedType == _ReflectiveTest)) { String name = MirrorSystem.getName(classMirror.qualifiedName); - throw new Exception('Class $name must have annotation "@reflectiveTest" ' + throw Exception('Class $name must have annotation "@reflectiveTest" ' 'in order to be run by runReflectiveTests.'); } @@ -104,7 +104,7 @@ void defineReflectiveTests(Type type) { { bool isSolo = _hasAnnotationInstance(classMirror, soloTest); String className = MirrorSystem.getName(classMirror.simpleName); - group = new _Group(isSolo, _combineNames(_currentSuiteName, className)); + group = _Group(isSolo, _combineNames(_currentSuiteName, className)); _currentGroups.add(group); } @@ -229,16 +229,18 @@ bool _hasSkippedTestAnnotation(MethodMirror method) => Future _invokeSymbolIfExists( InstanceMirror instanceMirror, Symbol symbol) { - Object? invocationResult = null; + Object? invocationResult; InstanceMirror? closure; try { closure = instanceMirror.getField(symbol); - } on NoSuchMethodError {} + } on NoSuchMethodError { + // ignore + } if (closure is ClosureMirror) { invocationResult = closure.apply([]).reflectee; } - return new Future.value(invocationResult); + return Future.value(invocationResult); } /** @@ -252,7 +254,8 @@ Future _invokeSymbolIfExists( Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { bool passed = false; return runZonedGuarded(() { - return new Future.sync(() => _runTest(classMirror, symbol)).then((_) { + // ignore: void_checks + return Future.sync(() => _runTest(classMirror, symbol)).then((_) { passed = true; test_package.fail('Test passed - expected to fail.'); }).catchError((e) { @@ -272,7 +275,7 @@ Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { } Future _runTest(ClassMirror classMirror, Symbol symbol) { - InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); + InstanceMirror instanceMirror = classMirror.newInstance(Symbol(''), []); return _invokeSymbolIfExists(instanceMirror, #setUp) .then((_) => instanceMirror.invoke(symbol, []).reflectee) .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); @@ -341,7 +344,7 @@ class _Group { void addSkippedTest(String name) { var fullName = _combineNames(this.name, name); - tests.add(new _Test.skipped(isSolo, fullName)); + tests.add(_Test.skipped(isSolo, fullName)); } void addTest(bool isSolo, String name, MethodMirror memberMirror, @@ -349,7 +352,7 @@ class _Group { var fullName = _combineNames(this.name, name); var timeout = _getAnnotationInstance(memberMirror, TestTimeout) as TestTimeout?; - tests.add(new _Test(isSolo, fullName, function, timeout?._timeout)); + tests.add(_Test(isSolo, fullName, function, timeout?._timeout)); } } diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 51cb753ac..57cf02b92 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.2.1-dev +version: 0.2.1 description: Support for discovering tests and test suites using reflection. repository: https://github.com/dart-lang/test_reflective_loader @@ -8,4 +8,4 @@ environment: dependencies: lints: ^1.0.0 - test: '>=1.16.0 <2.0.0' + test: ^1.16.0 diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index d303a75ba..ea7911f7f 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -33,7 +33,7 @@ class TestReflectiveLoaderTest { @failingTest Future test_fails_throws_async() { - return new Future.error('foo'); + return Future.error('foo'); } @skippedTest From eede1d6616b85d2483bf1533827a9b321f187b36 Mon Sep 17 00:00:00 2001 From: pq Date: Wed, 14 Sep 2022 14:18:15 -0700 Subject: [PATCH 46/81] update to lints 2.0.0; prep for publishing --- .../lib/test_reflective_loader.dart | 10 +++++----- pkgs/test_reflective_loader/pubspec.yaml | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 6237f676c..3881cf1c2 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -13,28 +13,28 @@ import 'package:test/test.dart' as test_package; * A marker annotation used to annotate test methods which are expected to fail * when asserts are enabled. */ -const _AssertFailingTest assertFailingTest = _AssertFailingTest(); +const Object assertFailingTest = _AssertFailingTest(); /** * A marker annotation used to annotate test methods which are expected to fail. */ -const FailingTest failingTest = FailingTest(); +const Object failingTest = FailingTest(); /** * A marker annotation used to instruct dart2js to keep reflection information * for the annotated classes. */ -const _ReflectiveTest reflectiveTest = _ReflectiveTest(); +const Object reflectiveTest = _ReflectiveTest(); /** * A marker annotation used to annotate test methods that should be skipped. */ -const SkippedTest skippedTest = SkippedTest(); +const Object skippedTest = SkippedTest(); /** * A marker annotation used to annotate "solo" groups and tests. */ -const _SoloTest soloTest = _SoloTest(); +const Object soloTest = _SoloTest(); final List<_Group> _currentGroups = <_Group>[]; int _currentSuiteLevel = 0; diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 57cf02b92..3919f780c 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -7,5 +7,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - lints: ^1.0.0 test: ^1.16.0 + +dev_dependencies: + lints: ^2.0.0 From 79407a893c8fbfd7fa5376d91dabe0ca47eeebcb Mon Sep 17 00:00:00 2001 From: pq Date: Wed, 14 Sep 2022 14:19:00 -0700 Subject: [PATCH 47/81] ++ --- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index 3919f780c..e4de919ee 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.2.1 +version: 0.2.2 description: Support for discovering tests and test suites using reflection. repository: https://github.com/dart-lang/test_reflective_loader From 11038d6a558833bb30f59eb343cf060bf8d183bd Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:25:31 -0700 Subject: [PATCH 48/81] drop beta container --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 2ac752518..050ea78a3 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -13,9 +13,6 @@ jobs: build: runs-on: ubuntu-latest - container: - image: google/dart:beta - steps: - uses: actions/checkout@v2 From bcec3ea0c4237a42ed8281a90683a7be6f564f0c Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:28:28 -0700 Subject: [PATCH 49/81] fix setup --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 050ea78a3..18269d413 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + with: + sdk: dev - name: pub get run: pub get From 5217d3d2eb9afffa251eb34eb4d016a7841a1879 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:30:49 -0700 Subject: [PATCH 50/81] + PUB_ENV --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 18269d413..48fa6c7df 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -9,6 +9,9 @@ on: # “At 00:00 (UTC) on Sunday.” - cron: '0 0 * * 0' +env: + PUB_ENVIRONMENT: bot.github + jobs: build: runs-on: ubuntu-latest From 629213de62cd01337e90a22b98d988fc42ee84d5 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:32:51 -0700 Subject: [PATCH 51/81] + dart pub call --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 48fa6c7df..b3754c7a0 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -23,7 +23,7 @@ jobs: sdk: dev - name: pub get - run: pub get + run: dart pub get - name: dart format run: dart format --output=none --set-exit-if-changed . From 92c6271f136820ef390dc12d8f566da8587d7e27 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:37:47 -0700 Subject: [PATCH 52/81] 0.2.2 --- pkgs/test_reflective_loader/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 05195a8f4..e233fef89 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2 + +- Update to package:lints 2.0.0 and move it to a dev dependency. + ## 0.2.1 - Use package:lints for analysis. From 9695157811df716d9b5dda87fbada51b64ca4572 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Wed, 14 Sep 2022 14:44:50 -0700 Subject: [PATCH 53/81] + matrix --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index b3754c7a0..9728c9492 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -15,13 +15,17 @@ env: jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev, stable] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 with: - sdk: dev - + sdk: ${{ matrix.sdk }} + - name: pub get run: dart pub get From 8d668a813cba1aa6448f5261cf87bff1ace18f08 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 15 Nov 2022 14:30:53 -0800 Subject: [PATCH 54/81] blast_repo fixes (dart-lang/test_reflective_loader#42) Dependabot GitHub Action --- pkgs/test_reflective_loader/.github/dependabot.yml | 9 +++++++++ pkgs/test_reflective_loader/.github/workflows/build.yaml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 pkgs/test_reflective_loader/.github/dependabot.yml diff --git a/pkgs/test_reflective_loader/.github/dependabot.yml b/pkgs/test_reflective_loader/.github/dependabot.yml new file mode 100644 index 000000000..1603cdd9e --- /dev/null +++ b/pkgs/test_reflective_loader/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Dependabot configuration file. +# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 9728c9492..10913c69f 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,8 +21,8 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From c2b153273d4dac0110becafec85f06ae74ece00b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 14:19:26 -0800 Subject: [PATCH 55/81] Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/test_reflective_loader#43) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 10913c69f..6155687a6 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 0f952cf19e8df6fdfb1a6ac02b0fe5a4b20330f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:33:38 -0800 Subject: [PATCH 56/81] Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/test_reflective_loader#44) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 6155687a6..296837e26 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From b9f3fd2316f318086396db8faf90e4445865b459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:37:00 -0800 Subject: [PATCH 57/81] Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/test_reflective_loader#45) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/6a218f2413a3e78e9087f638a238f6b40893203d...a57a6c04cf7d4840e88432aad6281d1e125f0d46) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 296837e26..5b84b5eb5 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 8e64e236cdb03119a32ed7e9458f82a53ef5aea5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:57:31 +0000 Subject: [PATCH 58/81] Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/test_reflective_loader#47) --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 5b84b5eb5..f6902d62d 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 6d39477b584638a8ca6994c618bf32998f35ae8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 17:12:11 -0700 Subject: [PATCH 59/81] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/test_reflective_loader#46) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/a57a6c04cf7d4840e88432aad6281d1e125f0d46...d6a63dab3335f427404425de0fbfed4686d93c4f) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Konstantin Scheglov --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index f6902d62d..a253754f8 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From e3326e1ab6910b077cb86c7dbfcaf8b7ffe5280d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 10:02:52 -0700 Subject: [PATCH 60/81] Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/test_reflective_loader#48) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index a253754f8..3b42f4ae5 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 997558adc96cdf8729ea071775fe613a57c3edce Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 19 May 2023 09:07:32 -0700 Subject: [PATCH 61/81] blast_repo fixes (dart-lang/test_reflective_loader#49) dependabot --- pkgs/test_reflective_loader/.github/dependabot.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/test_reflective_loader/.github/dependabot.yml b/pkgs/test_reflective_loader/.github/dependabot.yml index 1603cdd9e..725f03af2 100644 --- a/pkgs/test_reflective_loader/.github/dependabot.yml +++ b/pkgs/test_reflective_loader/.github/dependabot.yml @@ -3,7 +3,9 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "monthly" + interval: monthly + labels: + - autosubmit From 993013a718820446276d18bcb17627774b1f200a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 16:03:23 +0000 Subject: [PATCH 62/81] Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/test_reflective_loader#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
Release notes

Sourced from actions/checkout's releases.

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

v2.3.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.2&new-version=3.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 3b42f4ae5..fade1c9e7 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From c61ef50399960e92ac4adb131e8c02da7f71f88a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:59:57 +0000 Subject: [PATCH 63/81] Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/test_reflective_loader#51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
Release notes

Sourced from actions/checkout's releases.

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index fade1c9e7..66f1f151c 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 4ead479e559b4d964eea68e2622fcd2fe8243ca8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:10:05 +0000 Subject: [PATCH 64/81] Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/test_reflective_loader#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0.
Release notes

Sourced from actions/checkout's releases.

v4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.0.0...v4.1.0

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.6.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 66f1f151c..06dd7db12 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 2da9f6f0fdb86f9e0f310a4ee4454e605d88421d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:39:47 +0000 Subject: [PATCH 65/81] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/test_reflective_loader#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.0&new-version=1.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 06dd7db12..0d4b52099 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From 2460f52e9ad36e7321ea7fd81610946baab67027 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:09:27 +0000 Subject: [PATCH 66/81] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/test_reflective_loader#55) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 0d4b52099..3e74adbc1 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} From 2867db176a99bf8f934cf56ba7a0a6c6e84edb35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:12:08 +0000 Subject: [PATCH 67/81] Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/test_reflective_loader#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
Release notes

Sourced from actions/checkout's releases.

v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 3e74adbc1..a07546bea 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, stable] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} From 289718a4844d60ff2db14c7cf3424ef678813ec5 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 30 Nov 2023 18:11:32 -0800 Subject: [PATCH 68/81] Update lints, bump min SDK to ^3.1.0 (dart-lang/test_reflective_loader#56) --- .../.github/workflows/build.yaml | 14 +- pkgs/test_reflective_loader/CHANGELOG.md | 4 + .../analysis_options.yaml | 8 +- .../lib/test_reflective_loader.dart | 210 +++++++----------- pkgs/test_reflective_loader/pubspec.yaml | 6 +- .../test/test_reflective_loader_test.dart | 4 +- 6 files changed, 100 insertions(+), 146 deletions(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index a07546bea..9ebdc1f3d 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [dev, stable] + sdk: [dev, 3.1] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 @@ -26,14 +26,8 @@ jobs: with: sdk: ${{ matrix.sdk }} - - name: pub get - run: dart pub get - + - run: dart pub get - name: dart format run: dart format --output=none --set-exit-if-changed . - - - name: dart analyze - run: dart analyze - - - name: dart test - run: dart test + - run: dart analyze --fatal-infos + - run: dart test diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index e233fef89..5fd4c553e 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.3-wip + +- Require Dart `^3.1.0`. + ## 0.2.2 - Update to package:lints 2.0.0 and move it to a dev dependency. diff --git a/pkgs/test_reflective_loader/analysis_options.yaml b/pkgs/test_reflective_loader/analysis_options.yaml index fc2a9d30e..ea6115827 100644 --- a/pkgs/test_reflective_loader/analysis_options.yaml +++ b/pkgs/test_reflective_loader/analysis_options.yaml @@ -1,11 +1,5 @@ -include: package:lints/recommended.yaml - -analyzer: - errors: - slash_for_doc_comments: ignore +include: package:dart_flutter_team_lints/analysis_options.yaml linter: rules: - - always_declare_return_types - - directives_ordering - public_member_api_docs diff --git a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart index 3881cf1c2..cb69bf3ba 100644 --- a/pkgs/test_reflective_loader/lib/test_reflective_loader.dart +++ b/pkgs/test_reflective_loader/lib/test_reflective_loader.dart @@ -2,47 +2,34 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -library test_reflective_loader; - import 'dart:async'; import 'dart:mirrors'; import 'package:test/test.dart' as test_package; -/** - * A marker annotation used to annotate test methods which are expected to fail - * when asserts are enabled. - */ +/// A marker annotation used to annotate test methods which are expected to fail +/// when asserts are enabled. const Object assertFailingTest = _AssertFailingTest(); -/** - * A marker annotation used to annotate test methods which are expected to fail. - */ +/// A marker annotation used to annotate test methods which are expected to +/// fail. const Object failingTest = FailingTest(); -/** - * A marker annotation used to instruct dart2js to keep reflection information - * for the annotated classes. - */ +/// A marker annotation used to instruct dart2js to keep reflection information +/// for the annotated classes. const Object reflectiveTest = _ReflectiveTest(); -/** - * A marker annotation used to annotate test methods that should be skipped. - */ +/// A marker annotation used to annotate test methods that should be skipped. const Object skippedTest = SkippedTest(); -/** - * A marker annotation used to annotate "solo" groups and tests. - */ +/// A marker annotation used to annotate "solo" groups and tests. const Object soloTest = _SoloTest(); final List<_Group> _currentGroups = <_Group>[]; int _currentSuiteLevel = 0; String _currentSuiteName = ''; -/** - * Is `true` the application is running in the checked mode. - */ +/// Is `true` the application is running in the checked mode. final bool _isCheckedMode = () { try { assert(false); @@ -52,14 +39,12 @@ final bool _isCheckedMode = () { } }(); -/** - * Run the [define] function parameter that calls [defineReflectiveTests] to - * add normal and "solo" tests, and also calls [defineReflectiveSuite] to - * create embedded suites. If the current suite is the top-level one, perform - * check for "solo" groups and tests, and run all or only "solo" items. - */ +/// Run the [define] function parameter that calls [defineReflectiveTests] to +/// add normal and "solo" tests, and also calls [defineReflectiveSuite] to +/// create embedded suites. If the current suite is the top-level one, perform +/// check for "solo" groups and tests, and run all or only "solo" items. void defineReflectiveSuite(void Function() define, {String name = ''}) { - String groupName = _currentSuiteName; + var groupName = _currentSuiteName; _currentSuiteLevel++; try { _currentSuiteName = _combineNames(_currentSuiteName, name); @@ -71,39 +56,37 @@ void defineReflectiveSuite(void Function() define, {String name = ''}) { _addTestsIfTopLevelSuite(); } -/** - * Runs test methods existing in the given [type]. - * - * If there is a "solo" test method in the top-level suite, only "solo" methods - * are run. - * - * If there is a "solo" test type, only its test methods are run. - * - * Otherwise all tests methods of all test types are run. - * - * Each method is run with a new instance of [type]. - * So, [type] should have a default constructor. - * - * If [type] declares method `setUp`, it methods will be invoked before any test - * method invocation. - * - * If [type] declares method `tearDown`, it will be invoked after any test - * method invocation. If method returns [Future] to test some asynchronous - * behavior, then `tearDown` will be invoked in `Future.complete`. - */ +/// Runs test methods existing in the given [type]. +/// +/// If there is a "solo" test method in the top-level suite, only "solo" methods +/// are run. +/// +/// If there is a "solo" test type, only its test methods are run. +/// +/// Otherwise all tests methods of all test types are run. +/// +/// Each method is run with a new instance of [type]. +/// So, [type] should have a default constructor. +/// +/// If [type] declares method `setUp`, it methods will be invoked before any +/// test method invocation. +/// +/// If [type] declares method `tearDown`, it will be invoked after any test +/// method invocation. If method returns [Future] to test some asynchronous +/// behavior, then `tearDown` will be invoked in `Future.complete`. void defineReflectiveTests(Type type) { - ClassMirror classMirror = reflectClass(type); + var classMirror = reflectClass(type); if (!classMirror.metadata.any((InstanceMirror annotation) => annotation.type.reflectedType == _ReflectiveTest)) { - String name = MirrorSystem.getName(classMirror.qualifiedName); + var name = MirrorSystem.getName(classMirror.qualifiedName); throw Exception('Class $name must have annotation "@reflectiveTest" ' 'in order to be run by runReflectiveTests.'); } _Group group; { - bool isSolo = _hasAnnotationInstance(classMirror, soloTest); - String className = MirrorSystem.getName(classMirror.simpleName); + var isSolo = _hasAnnotationInstance(classMirror, soloTest); + var className = MirrorSystem.getName(classMirror.simpleName); group = _Group(isSolo, _combineNames(_currentSuiteName, className)); _currentGroups.add(group); } @@ -115,8 +98,8 @@ void defineReflectiveTests(Type type) { return; } // prepare information about the method - String memberName = MirrorSystem.getName(symbol); - bool isSolo = memberName.startsWith('solo_') || + var memberName = MirrorSystem.getName(symbol); + var isSolo = memberName.startsWith('solo_') || _hasAnnotationInstance(memberMirror, soloTest); // test_ if (memberName.startsWith('test_')) { @@ -162,15 +145,13 @@ void defineReflectiveTests(Type type) { _addTestsIfTopLevelSuite(); } -/** - * If the current suite is the top-level one, add tests to the `test` package. - */ +/// If the current suite is the top-level one, add tests to the `test` package. void _addTestsIfTopLevelSuite() { if (_currentSuiteLevel == 0) { void runTests({required bool allGroups, required bool allTests}) { - for (_Group group in _currentGroups) { + for (var group in _currentGroups) { if (allGroups || group.isSolo) { - for (_Test test in group.tests) { + for (var test in group.tests) { if (allTests || test.isSolo) { test_package.test(test.name, test.function, timeout: test.timeout, skip: test.isSkipped); @@ -191,10 +172,8 @@ void _addTestsIfTopLevelSuite() { } } -/** - * Return the combination of the [base] and [addition] names. - * If any other two is `null`, then the other one is returned. - */ +/// Return the combination of the [base] and [addition] names. +/// If any other two is `null`, then the other one is returned. String _combineNames(String base, String addition) { if (base.isEmpty) { return addition; @@ -206,15 +185,15 @@ String _combineNames(String base, String addition) { } Object? _getAnnotationInstance(DeclarationMirror declaration, Type type) { - for (InstanceMirror annotation in declaration.metadata) { - if (annotation.reflectee.runtimeType == type) { + for (var annotation in declaration.metadata) { + if ((annotation.reflectee as Object).runtimeType == type) { return annotation.reflectee; } } return null; } -bool _hasAnnotationInstance(DeclarationMirror declaration, instance) => +bool _hasAnnotationInstance(DeclarationMirror declaration, Object instance) => declaration.metadata.any((InstanceMirror annotation) => identical(annotation.reflectee, instance)); @@ -233,6 +212,7 @@ Future _invokeSymbolIfExists( InstanceMirror? closure; try { closure = instanceMirror.getField(symbol); + // ignore: avoid_catching_errors } on NoSuchMethodError { // ignore } @@ -243,24 +223,23 @@ Future _invokeSymbolIfExists( return Future.value(invocationResult); } -/** - * Run a test that is expected to fail, and confirm that it fails. - * - * This properly handles the following cases: - * - The test fails by throwing an exception - * - The test returns a future which completes with an error. - * - An exception is thrown to the zone handler from a timer task. - */ +/// Run a test that is expected to fail, and confirm that it fails. +/// +/// This properly handles the following cases: +/// - The test fails by throwing an exception +/// - The test returns a future which completes with an error. +/// - An exception is thrown to the zone handler from a timer task. Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { - bool passed = false; + var passed = false; return runZonedGuarded(() { // ignore: void_checks return Future.sync(() => _runTest(classMirror, symbol)).then((_) { passed = true; test_package.fail('Test passed - expected to fail.'); - }).catchError((e) { + }).catchError((Object e) { // if passed, and we call fail(), rethrow this exception if (passed) { + // ignore: only_throw_errors throw e; } // otherwise, an exception is not a failure for _runFailingTest @@ -268,71 +247,60 @@ Future? _runFailingTest(ClassMirror classMirror, Symbol symbol) { }, (e, st) { // if passed, and we call fail(), rethrow this exception if (passed) { + // ignore: only_throw_errors throw e; } // otherwise, an exception is not a failure for _runFailingTest }); } -Future _runTest(ClassMirror classMirror, Symbol symbol) { - InstanceMirror instanceMirror = classMirror.newInstance(Symbol(''), []); - return _invokeSymbolIfExists(instanceMirror, #setUp) - .then((_) => instanceMirror.invoke(symbol, []).reflectee) - .whenComplete(() => _invokeSymbolIfExists(instanceMirror, #tearDown)); +Future _runTest(ClassMirror classMirror, Symbol symbol) async { + var instanceMirror = classMirror.newInstance(const Symbol(''), []); + try { + await _invokeSymbolIfExists(instanceMirror, #setUp); + await instanceMirror.invoke(symbol, []).reflectee; + } finally { + await _invokeSymbolIfExists(instanceMirror, #tearDown); + } } typedef _TestFunction = dynamic Function(); -/** - * A marker annotation used to annotate test methods which are expected to fail. - */ +/// A marker annotation used to annotate test methods which are expected to +/// fail. class FailingTest { - /** - * Initialize this annotation with the given arguments. - * - * [issue] is a full URI describing the failure and used for tracking. - * [reason] is a free form textual description. - */ + /// Initialize this annotation with the given arguments. + /// + /// [issue] is a full URI describing the failure and used for tracking. + /// [reason] is a free form textual description. const FailingTest({String? issue, String? reason}); } -/** - * A marker annotation used to annotate test methods which are skipped. - */ +/// A marker annotation used to annotate test methods which are skipped. class SkippedTest { - /** - * Initialize this annotation with the given arguments. - * - * [issue] is a full URI describing the failure and used for tracking. - * [reason] is a free form textual description. - */ + /// Initialize this annotation with the given arguments. + /// + /// [issue] is a full URI describing the failure and used for tracking. + /// [reason] is a free form textual description. const SkippedTest({String? issue, String? reason}); } -/** - * A marker annotation used to annotate test methods with additional timeout - * information. - */ +/// A marker annotation used to annotate test methods with additional timeout +/// information. class TestTimeout { final test_package.Timeout _timeout; - /** - * Initialize this annotation with the given timeout. - */ + /// Initialize this annotation with the given timeout. const TestTimeout(test_package.Timeout timeout) : _timeout = timeout; } -/** - * A marker annotation used to annotate test methods which are expected to fail - * when asserts are enabled. - */ +/// A marker annotation used to annotate test methods which are expected to fail +/// when asserts are enabled. class _AssertFailingTest { const _AssertFailingTest(); } -/** - * Information about a type based test group. - */ +/// Information about a type based test group. class _Group { final bool isSolo; final String name; @@ -356,24 +324,18 @@ class _Group { } } -/** - * A marker annotation used to instruct dart2js to keep reflection information - * for the annotated classes. - */ +/// A marker annotation used to instruct dart2js to keep reflection information +/// for the annotated classes. class _ReflectiveTest { const _ReflectiveTest(); } -/** - * A marker annotation used to annotate "solo" groups and tests. - */ +/// A marker annotation used to annotate "solo" groups and tests. class _SoloTest { const _SoloTest(); } -/** - * Information about a test. - */ +/// Information about a test. class _Test { final bool isSolo; final String name; diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index e4de919ee..c30323c7c 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,13 +1,13 @@ name: test_reflective_loader -version: 0.2.2 +version: 0.2.3-wip description: Support for discovering tests and test suites using reflection. repository: https://github.com/dart-lang/test_reflective_loader environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ^3.1.0 dependencies: test: ^1.16.0 dev_dependencies: - lints: ^2.0.0 + dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart index ea7911f7f..fad98a5a1 100644 --- a/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart +++ b/pkgs/test_reflective_loader/test/test_reflective_loader_test.dart @@ -28,7 +28,7 @@ class TestReflectiveLoaderTest { @failingTest void test_fails_throws_sync() { - throw 'foo'; + throw StateError('foo'); } @failingTest @@ -38,7 +38,7 @@ class TestReflectiveLoaderTest { @skippedTest void test_fails_but_skipped() { - throw 'foo'; + throw StateError('foo'); } @skippedTest From 8f06600eee0193c040307267ae36fb81ef6b0f00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:26:15 +0000 Subject: [PATCH 69/81] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test_reflective_loader#57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 9ebdc1f3d..8ca97a727 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 14ed328d61b64d6c7de1495d49fe34ce7f3566f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:09:14 +0000 Subject: [PATCH 70/81] Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/test_reflective_loader#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
Release notes

Sourced from actions/checkout's releases.

v4.1.2

We are investigating the following issue with this release and have rolled-back the v4 tag to point to v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.1...v4.1.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 8ca97a727..ef969b173 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 1c91f5b5f52eaad2e404e78f3f22a500694cd28d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:21:20 +0000 Subject: [PATCH 71/81] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/test_reflective_loader#60) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index ef969b173..a733ade3a 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 39b7ebe40e73fd4cd6b00567ee74f369311fa943 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:22:56 +0000 Subject: [PATCH 72/81] Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/test_reflective_loader#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
Release notes

Sourced from actions/checkout's releases.

v4.1.4

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.3...v4.1.4

v4.1.3

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index a733ade3a..97f2c698c 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From e2de79737d06377e39820c1b37c4b6ea2fd0635d Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 10 May 2024 12:43:21 -0700 Subject: [PATCH 73/81] blast_repo fixes (dart-lang/test_reflective_loader#61) dependabot --- pkgs/test_reflective_loader/.github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/test_reflective_loader/.github/dependabot.yml b/pkgs/test_reflective_loader/.github/dependabot.yml index 725f03af2..cde02ad6a 100644 --- a/pkgs/test_reflective_loader/.github/dependabot.yml +++ b/pkgs/test_reflective_loader/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From 387f5aed312f5130a039ba9489a364564a29e7f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 20:23:31 +0000 Subject: [PATCH 74/81] Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (dart-lang/test_reflective_loader#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5
Release notes

Sourced from actions/checkout's releases.

v4.1.5

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.4&new-version=4.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 97f2c698c..338e0b8c5 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 8a1643c1e02808afe016fa0fa9de9cea9a88d86b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:34:18 +0000 Subject: [PATCH 75/81] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/test_reflective_loader#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.5 to 4.1.6
Release notes

Sourced from actions/checkout's releases.

v4.1.6

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.5...v4.1.6

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.5&new-version=4.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 338e0b8c5..cfad53058 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 93d51e16ca5060760bf3714941dfedaabdb620c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:21:57 +0000 Subject: [PATCH 76/81] Bump the github-actions group with 2 updates (dart-lang/test_reflective_loader#64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7
Release notes

Sourced from actions/checkout's releases.

v4.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.6...v4.1.7

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

... (truncated)

Commits

Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.5

dart-lang/test_reflective_loader#118: dart-lang/setup-dartdart-lang/test_reflective_loader#118

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.5

dart-lang/test_reflective_loader#118: dart-lang/setup-dartdart-lang/test_reflective_loader#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index cfad53058..f863fb20e 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,8 +21,8 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 762063c0916a7b3279e804fd85a1f0a631df5f5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:42:56 +0000 Subject: [PATCH 77/81] Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/test_reflective_loader#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.7 to 4.2.0
Release notes

Sourced from actions/checkout's releases.

v4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.7...v4.2.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.7&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index f863fb20e..c95f0c729 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 1729eee40d78eb4ad868b7b958a16e8b63a0f8ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:47:02 +0000 Subject: [PATCH 78/81] Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group (dart-lang/test_reflective_loader#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.0 to 4.2.2
Release notes

Sourced from actions/checkout's releases.

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.2.0&new-version=4.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index c95f0c729..59675a863 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: sdk: [dev, 3.1] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 5d042243ab6b868db9cf5619dc6c37d992f6c60f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:45:10 +0000 Subject: [PATCH 79/81] Bump dart-lang/setup-dart in the github-actions group (dart-lang/test_reflective_loader#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `dart-lang/setup-dart` from 1.6.5 to 1.7.0
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.7.0

What's Changed

  • Install a Flutter SDK in the publish workflow allowing for publication of flutter packages.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.7.0

v1.6.5

dart-lang/test_reflective_loader#118: dart-lang/setup-dartdart-lang/test_reflective_loader#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.5&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_reflective_loader/.github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/pkgs/test_reflective_loader/.github/workflows/build.yaml index 59675a863..2c15d9546 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/pkgs/test_reflective_loader/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} From 1d67e12aaab1e3a5ce4e1185577e2f32994e0cc0 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 11 Dec 2024 14:39:04 +0100 Subject: [PATCH 80/81] Add issue template and other fixes --- .../ISSUE_TEMPLATE/test_reflective_loader.md | 5 +++ pkgs/test_reflective_loader/CONTRIBUTING.md | 33 ------------------- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 34 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/test_reflective_loader.md delete mode 100644 pkgs/test_reflective_loader/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/test_reflective_loader.md b/.github/ISSUE_TEMPLATE/test_reflective_loader.md new file mode 100644 index 000000000..bde03feb7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test_reflective_loader.md @@ -0,0 +1,5 @@ +--- +name: "package:test_reflective_loader" +about: "Create a bug or file a feature request against package:test_reflective_loader." +labels: "package:test_reflective_loader" +--- \ No newline at end of file diff --git a/pkgs/test_reflective_loader/CONTRIBUTING.md b/pkgs/test_reflective_loader/CONTRIBUTING.md deleted file mode 100644 index 6f5e0ea67..000000000 --- a/pkgs/test_reflective_loader/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. - -### File headers -All files in the project must start with the following header. - - // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. - -### The small print -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index c30323c7c..dfb3cd06d 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,7 +1,7 @@ name: test_reflective_loader version: 0.2.3-wip description: Support for discovering tests and test suites using reflection. -repository: https://github.com/dart-lang/test_reflective_loader +repository: https://github.com/dart-lang/tools/tree/main/pkgs/test_reflective_loader environment: sdk: ^3.1.0 From 59d823edad641ec8dcde9e2f15c36826af0d9ccf Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 11 Dec 2024 14:42:35 +0100 Subject: [PATCH 81/81] Moving fixes --- .github/labeler.yml | 4 ++++ .../workflows/test_reflective_loader.yaml | 22 ++++++++++++++----- README.md | 1 + .../.github/dependabot.yml | 15 ------------- pkgs/test_reflective_loader/CHANGELOG.md | 3 ++- pkgs/test_reflective_loader/README.md | 5 +++-- pkgs/test_reflective_loader/pubspec.yaml | 2 +- 7 files changed, 27 insertions(+), 25 deletions(-) rename pkgs/test_reflective_loader/.github/workflows/build.yaml => .github/workflows/test_reflective_loader.yaml (57%) delete mode 100644 pkgs/test_reflective_loader/.github/dependabot.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 1cc4b2058..16a5ce833 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -108,6 +108,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/sse/**' +'package:test_reflective_loader': + - changed-files: + - any-glob-to-any-file: 'pkgs/test_reflective_loader/**' + 'package:unified_analytics': - changed-files: - any-glob-to-any-file: 'pkgs/unified_analytics/**' diff --git a/pkgs/test_reflective_loader/.github/workflows/build.yaml b/.github/workflows/test_reflective_loader.yaml similarity index 57% rename from pkgs/test_reflective_loader/.github/workflows/build.yaml rename to .github/workflows/test_reflective_loader.yaml index 2c15d9546..975c97049 100644 --- a/pkgs/test_reflective_loader/.github/workflows/build.yaml +++ b/.github/workflows/test_reflective_loader.yaml @@ -1,17 +1,27 @@ -name: Dart +name: package:test_reflective_loader on: - pull_request: + # Run on PRs and pushes to the default branch. push: - branches: - - master + branches: [ main ] + paths: + - '.github/workflows/test_reflective_loader.yaml' + - 'pkgs/test_reflective_loader/**' + pull_request: + branches: [ main ] + paths: + - '.github/workflows/test_reflective_loader.yaml' + - 'pkgs/test_reflective_loader/**' schedule: - # “At 00:00 (UTC) on Sunday.” - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" env: PUB_ENVIRONMENT: bot.github +defaults: + run: + working-directory: pkgs/test_reflective_loader/ + jobs: build: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 79d1dde21..74be5a926 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ don't naturally belong to other topic monorepos (like | [source_maps](pkgs/source_maps/) | A library to programmatically manipulate source map files. | [![package issues](https://img.shields.io/badge/package:source_maps-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_maps) | [![pub package](https://img.shields.io/pub/v/source_maps.svg)](https://pub.dev/packages/source_maps) | | [source_span](pkgs/source_span/) | Provides a standard representation for source code locations and spans. | [![package issues](https://img.shields.io/badge/package:source_span-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_span) | [![pub package](https://img.shields.io/pub/v/source_span.svg)](https://pub.dev/packages/source_span) | | [sse](pkgs/sse/) | Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. | [![package issues](https://img.shields.io/badge/package:sse-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asse) | [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) | +| [test_reflective_loader](pkgs/test_reflective_loader/) | Support for discovering tests and test suites using reflection. | [![package issues](https://img.shields.io/badge/package:test_reflective_loader-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest_reflective_loader) | [![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader) | | [unified_analytics](pkgs/unified_analytics/) | A package for logging analytics for all Dart and Flutter related tooling to Google Analytics. | [![package issues](https://img.shields.io/badge/package:unified_analytics-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics) | [![pub package](https://img.shields.io/pub/v/unified_analytics.svg)](https://pub.dev/packages/unified_analytics) | ## Publishing automation diff --git a/pkgs/test_reflective_loader/.github/dependabot.yml b/pkgs/test_reflective_loader/.github/dependabot.yml deleted file mode 100644 index cde02ad6a..000000000 --- a/pkgs/test_reflective_loader/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Dependabot configuration file. -# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/test_reflective_loader/CHANGELOG.md b/pkgs/test_reflective_loader/CHANGELOG.md index 5fd4c553e..803eb0e0c 100644 --- a/pkgs/test_reflective_loader/CHANGELOG.md +++ b/pkgs/test_reflective_loader/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.2.3-wip +## 0.2.3 - Require Dart `^3.1.0`. +- Move to `dart-lang/tools` monorepo. ## 0.2.2 diff --git a/pkgs/test_reflective_loader/README.md b/pkgs/test_reflective_loader/README.md index f7d07dbe3..9b5a83d4e 100644 --- a/pkgs/test_reflective_loader/README.md +++ b/pkgs/test_reflective_loader/README.md @@ -1,5 +1,6 @@ -[![Build Status](https://github.com/dart-lang/test_reflective_loader/workflows/Dart/badge.svg)](https://github.com/dart-lang/test_reflective_loader/actions) +[![Build Status](https://github.com/dart-lang/tools/actions/workflows/test_reflective_loader.yaml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/test_reflective_loader.yaml) [![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader) +[![package publisher](https://img.shields.io/pub/publisher/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader/publisher) Support for discovering tests and test suites using reflection. @@ -24,4 +25,4 @@ executed after the returned `Future` completes. Please file feature requests and bugs at the [issue tracker][tracker]. -[tracker]: https://github.com/dart-lang/test_reflective_loader/issues +[tracker]: https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest_reflective_loader diff --git a/pkgs/test_reflective_loader/pubspec.yaml b/pkgs/test_reflective_loader/pubspec.yaml index dfb3cd06d..953ece944 100644 --- a/pkgs/test_reflective_loader/pubspec.yaml +++ b/pkgs/test_reflective_loader/pubspec.yaml @@ -1,5 +1,5 @@ name: test_reflective_loader -version: 0.2.3-wip +version: 0.2.3 description: Support for discovering tests and test suites using reflection. repository: https://github.com/dart-lang/tools/tree/main/pkgs/test_reflective_loader