diff --git a/DEPS b/DEPS index 0648412fa98..ad927f8d71c 100644 --- a/DEPS +++ b/DEPS @@ -156,7 +156,7 @@ vars = { "intl_rev": "5d65e3808ce40e6282e40881492607df4e35669f", "json_rpc_2_rev": "0521afb58b9aeb90beda8fa5b00b98b998ec9ba6", "leak_tracker_rev": "098bafcf99a5220e3c352d895d991e163568ee03", # b/299640139 - "lints_rev": "b044acab9f6669b3d8e781923a8ff86877801177", + "lints_rev": "90d350eb89fe265c13b5a9c34bfd41e5323896ed", "logging_rev": "642ed2124f7ef7abc819a0e22ae0c7afdb5398d3", "markdown_rev": "ae766d52d22b54c05240989871b14ede1848b345", "matcher_rev": "11daad9d3b62539feca5decfa465ccdfb87dde86", diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart index 401363dad29..cd9219ba092 100644 --- a/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart +++ b/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart @@ -4,6 +4,8 @@ /// Support for client code that needs to interact with the requests, responses /// and notifications that are part of the analysis server's wire protocol. +library; + import 'dart:convert' hide JsonDecoder; import 'package:analysis_server_client/src/protocol/protocol_generated.dart'; diff --git a/pkg/analyzer_cli/tool/perf.dart b/pkg/analyzer_cli/tool/perf.dart index 09aa60a5544..75845883054 100644 --- a/pkg/analyzer_cli/tool/perf.dart +++ b/pkg/analyzer_cli/tool/perf.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// An entrypoint used to run portions of analyzer and measure its performance. +library; + import 'dart:io' show exit; import 'package:analyzer/dart/analysis/features.dart'; diff --git a/pkg/analyzer_cli/tool/perf_test.dart b/pkg/analyzer_cli/tool/perf_test.dart index 48c857ae221..ebe28b1d5af 100644 --- a/pkg/analyzer_cli/tool/perf_test.dart +++ b/pkg/analyzer_cli/tool/perf_test.dart @@ -4,6 +4,8 @@ /// The only purpose of this file is to enable analyzer tests on `perf.dart`, /// the code here just has a dummy import to the rest of the code. +library; + import 'perf.dart' as m; void main() => print('done ${m.scanTotalChars}'); diff --git a/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart b/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart index 25fbdb3ec98..b0bbcf9566b 100644 --- a/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart +++ b/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart @@ -7,6 +7,8 @@ // "pkg/analysis_server/tool/spec/generate_files". /// Convenience methods for running integration tests. +library; + import 'dart:async'; import 'package:analyzer_plugin/protocol/protocol_common.dart'; diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart index 8cab210b597..611cfb94cda 100644 --- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart +++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart @@ -7,6 +7,8 @@ // "pkg/analysis_server/tool/spec/generate_files". /// Matchers for data types defined in the analysis server API. +library; + import 'package:test/test.dart'; import 'integration_tests.dart'; diff --git a/pkg/analyzer_plugin/tool/spec/api.dart b/pkg/analyzer_plugin/tool/spec/api.dart index fe1231eac4e..b692a602a4f 100644 --- a/pkg/analyzer_plugin/tool/spec/api.dart +++ b/pkg/analyzer_plugin/tool/spec/api.dart @@ -4,6 +4,8 @@ /// Data structures representing an API definition, and visitor base classes /// for visiting those data structures. +library; + import 'dart:collection'; import 'package:analyzer_utilities/html_dom.dart' as dom; diff --git a/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart b/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart index 0a44cfcb187..c2c4fd73826 100644 --- a/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart +++ b/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Code generation for the file "integration_test_methods.dart". +library; + import 'package:analyzer_utilities/tools.dart'; import 'package:path/path.dart' as path; @@ -85,6 +87,8 @@ class CodegenInttestMethodsVisitor extends DartCodegenVisitor outputHeader(year: '2017'); writeln(); writeln('/// Convenience methods for running integration tests.'); + writeln('library;'); + writeln(); writeln("import 'dart:async';"); writeln(); for (var uri in api.types.importUris) { diff --git a/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart b/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart index aaf4ef7f209..ece3338f20e 100644 --- a/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart +++ b/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Code generation for the file "matchers.dart". +library; + import 'package:analyzer_utilities/tools.dart'; import 'api.dart'; @@ -90,6 +92,8 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator { outputHeader(year: '2017'); writeln(); writeln('/// Matchers for data types defined in the analysis server API.'); + writeln('library;'); + writeln(); writeln("import 'package:test/test.dart';"); writeln(); writeln("import 'integration_tests.dart';"); diff --git a/pkg/analyzer_plugin/tool/spec/from_html.dart b/pkg/analyzer_plugin/tool/spec/from_html.dart index 6e9bb32dd31..c7675b52815 100644 --- a/pkg/analyzer_plugin/tool/spec/from_html.dart +++ b/pkg/analyzer_plugin/tool/spec/from_html.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Code for reading an HTML API description. +library; + import 'dart:io'; import 'package:analyzer_utilities/html_dom.dart' as dom; diff --git a/pkg/analyzer_plugin/tool/spec/implied_types.dart b/pkg/analyzer_plugin/tool/spec/implied_types.dart index f8412eca841..03d4ffad29d 100644 --- a/pkg/analyzer_plugin/tool/spec/implied_types.dart +++ b/pkg/analyzer_plugin/tool/spec/implied_types.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Code for enumerating the set of types implied by the API. +library; + import 'package:analyzer_utilities/tools.dart'; import 'api.dart'; diff --git a/pkg/analyzer_plugin/tool/spec/to_html.dart b/pkg/analyzer_plugin/tool/spec/to_html.dart index 89ab494c90c..7f165515789 100644 --- a/pkg/analyzer_plugin/tool/spec/to_html.dart +++ b/pkg/analyzer_plugin/tool/spec/to_html.dart @@ -5,6 +5,8 @@ /// Code for displaying the API as HTML. This is used both for generating a /// full description of the API as a web page, and for generating doc comments /// in generated code. +library; + import 'dart:convert'; import 'package:analyzer_utilities/html_dom.dart' as dom; diff --git a/pkg/async_helper/lib/async_minitest.dart b/pkg/async_helper/lib/async_minitest.dart index 2f4ab9316d9..88bc9476b86 100644 --- a/pkg/async_helper/lib/async_minitest.dart +++ b/pkg/async_helper/lib/async_minitest.dart @@ -27,6 +27,8 @@ /// /// Eventually, it would be good to refactor those tests to use the expect /// package directly and remove this. +library; + import 'dart:async'; import 'package:async_helper/async_helper.dart'; diff --git a/pkg/async_helper/pubspec.yaml b/pkg/async_helper/pubspec.yaml index daaf7a85abf..f2b92e73938 100644 --- a/pkg/async_helper/pubspec.yaml +++ b/pkg/async_helper/pubspec.yaml @@ -9,7 +9,7 @@ description: >- provided in package:test. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/dart2js_info/bin/src/to_proto.dart b/pkg/dart2js_info/bin/src/to_proto.dart index 163725f3f65..0eb0724cdcd 100644 --- a/pkg/dart2js_info/bin/src/to_proto.dart +++ b/pkg/dart2js_info/bin/src/to_proto.dart @@ -4,6 +4,7 @@ /// Command-line tool to convert an info.json file outputted by dart2js to the /// alternative protobuf format. +library; import 'dart:io'; diff --git a/pkg/dart2js_info/lib/binary_serialization.dart b/pkg/dart2js_info/lib/binary_serialization.dart index dbf81265928..8f682d1b66e 100644 --- a/pkg/dart2js_info/lib/binary_serialization.dart +++ b/pkg/dart2js_info/lib/binary_serialization.dart @@ -5,6 +5,7 @@ /// Info serialization to a binary form. /// /// Unlike the JSON codec, this serialization is designed to be streamed. +library; import 'dart:convert'; diff --git a/pkg/dart2js_info/lib/json_info_codec.dart b/pkg/dart2js_info/lib/json_info_codec.dart index 32372300faf..19f4b2d820a 100644 --- a/pkg/dart2js_info/lib/json_info_codec.dart +++ b/pkg/dart2js_info/lib/json_info_codec.dart @@ -5,6 +5,8 @@ // ignore_for_file: avoid_dynamic_calls /// Converters and codecs for converting between JSON and [Info] classes. +library; + import 'dart:collection'; import 'dart:convert'; diff --git a/pkg/dart2js_info/lib/proto_info_codec.dart b/pkg/dart2js_info/lib/proto_info_codec.dart index 7e1a54dff0e..3b9f3ea9f5d 100644 --- a/pkg/dart2js_info/lib/proto_info_codec.dart +++ b/pkg/dart2js_info/lib/proto_info_codec.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Converters and codecs for converting between Protobuf and [Info] classes. +library; + import 'dart:convert'; import 'package:fixnum/fixnum.dart'; diff --git a/pkg/dart2js_info/lib/src/proto/info.pb.dart b/pkg/dart2js_info/lib/src/proto/info.pb.dart index 6d56230bb9b..a67095f1508 100644 --- a/pkg/dart2js_info/lib/src/proto/info.pb.dart +++ b/pkg/dart2js_info/lib/src/proto/info.pb.dart @@ -1,4 +1,3 @@ -/// // Generated code. Do not modify. // source: info.proto // diff --git a/pkg/dart2js_info/lib/src/proto/info.pbenum.dart b/pkg/dart2js_info/lib/src/proto/info.pbenum.dart index 505c9b9e149..e6a462e151e 100644 --- a/pkg/dart2js_info/lib/src/proto/info.pbenum.dart +++ b/pkg/dart2js_info/lib/src/proto/info.pbenum.dart @@ -1,4 +1,3 @@ -/// // Generated code. Do not modify. // source: info.proto // diff --git a/pkg/dart2js_info/lib/src/proto/info.pbjson.dart b/pkg/dart2js_info/lib/src/proto/info.pbjson.dart index e14b5d8bdf1..cd4a4bc9c69 100644 --- a/pkg/dart2js_info/lib/src/proto/info.pbjson.dart +++ b/pkg/dart2js_info/lib/src/proto/info.pbjson.dart @@ -1,4 +1,3 @@ -/// // Generated code. Do not modify. // source: info.proto // diff --git a/pkg/dart2js_info/lib/src/proto/info.pbserver.dart b/pkg/dart2js_info/lib/src/proto/info.pbserver.dart index ad952e9ff0b..bf15d7d947f 100644 --- a/pkg/dart2js_info/lib/src/proto/info.pbserver.dart +++ b/pkg/dart2js_info/lib/src/proto/info.pbserver.dart @@ -1,4 +1,3 @@ -/// // Generated code. Do not modify. // source: info.proto // diff --git a/pkg/dart2js_info/pubspec.yaml b/pkg/dart2js_info/pubspec.yaml index 4a7d9f56335..c86518816cf 100644 --- a/pkg/dart2js_info/pubspec.yaml +++ b/pkg/dart2js_info/pubspec.yaml @@ -6,7 +6,7 @@ description: >- --dump-info. environment: - sdk: '>=2.16.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/dart2js_tools/lib/src/dart2js_mapping.dart b/pkg/dart2js_tools/lib/src/dart2js_mapping.dart index d3c9d62e639..231ec58cd77 100644 --- a/pkg/dart2js_tools/lib/src/dart2js_mapping.dart +++ b/pkg/dart2js_tools/lib/src/dart2js_mapping.dart @@ -4,6 +4,7 @@ /// Representation of a source-map file with dart2js-specific extensions, and /// helper functions to parse them. +library; import 'dart:convert'; import 'dart:io'; diff --git a/pkg/dart2js_tools/lib/src/name_decoder.dart b/pkg/dart2js_tools/lib/src/name_decoder.dart index 8b323ac16d7..463fdbd8047 100644 --- a/pkg/dart2js_tools/lib/src/name_decoder.dart +++ b/pkg/dart2js_tools/lib/src/name_decoder.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Logic to deobfuscate minified names that appear in error messages. +library; import 'package:source_maps/source_maps.dart'; diff --git a/pkg/dart2js_tools/lib/src/sourcemap_helper.dart b/pkg/dart2js_tools/lib/src/sourcemap_helper.dart index 0cd4e6cf54e..17939cdf80b 100644 --- a/pkg/dart2js_tools/lib/src/sourcemap_helper.dart +++ b/pkg/dart2js_tools/lib/src/sourcemap_helper.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Utility functions to make it easier to work with source-map files. +library; import 'package:source_maps/source_maps.dart'; // ignore: implementation_imports diff --git a/pkg/dart2js_tools/lib/src/trace.dart b/pkg/dart2js_tools/lib/src/trace.dart index c371fd75a53..862fee2aa94 100644 --- a/pkg/dart2js_tools/lib/src/trace.dart +++ b/pkg/dart2js_tools/lib/src/trace.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Representation of stack traces and logic to parse d8 stack traces. +library; + // TODO(sigmund): we should delete this implementation and instead: // - switch to use the stack_trace package // - add support non-d8 frames diff --git a/pkg/dart2js_tools/lib/src/trace_decoder.dart b/pkg/dart2js_tools/lib/src/trace_decoder.dart index 11907df143c..a34289f9f56 100644 --- a/pkg/dart2js_tools/lib/src/trace_decoder.dart +++ b/pkg/dart2js_tools/lib/src/trace_decoder.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Logic to expand and deobfuscate stack traces. +library; // ignore: implementation_imports import 'package:source_maps/src/utils.dart'; diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml index ce67a9bd7aa..12c16da1ce9 100644 --- a/pkg/dart2js_tools/pubspec.yaml +++ b/pkg/dart2js_tools/pubspec.yaml @@ -6,7 +6,7 @@ description: > information, deobfuscation of stack-traces and minified names. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/dartdev/tool/sdk_size.dart b/pkg/dartdev/tool/sdk_size.dart index bfb0d2a34e5..bf711a7efdb 100644 --- a/pkg/dartdev/tool/sdk_size.dart +++ b/pkg/dartdev/tool/sdk_size.dart @@ -4,6 +4,7 @@ /// Generate a json file representing the files in the Dart SDK and their sizes. /// Print out instructions for opening Dart DevTools to visualize this info. +library; import 'dart:convert'; import 'dart:io'; diff --git a/pkg/dev_compiler/bin/dartdevc.dart b/pkg/dev_compiler/bin/dartdevc.dart index 7ca53761df1..ad440242979 100644 --- a/pkg/dev_compiler/bin/dartdevc.dart +++ b/pkg/dev_compiler/bin/dartdevc.dart @@ -5,6 +5,7 @@ /// Command line entry point for Dart Development Compiler (dartdevc), used to /// compile a collection of dart libraries into a single JS module +library; import 'dart:isolate'; diff --git a/pkg/dev_compiler/lib/ddc.dart b/pkg/dev_compiler/lib/ddc.dart index c0e9d0f35dc..f084b998190 100755 --- a/pkg/dev_compiler/lib/ddc.dart +++ b/pkg/dev_compiler/lib/ddc.dart @@ -5,6 +5,7 @@ /// Command line entry point for Dart Development Compiler (known as ddc, /// dartdevc, dev compiler), used to compile a collection of dart libraries into /// a single JS module. +library; import 'dart:async'; import 'dart:convert'; diff --git a/pkg/dev_compiler/test/modular_suite.dart b/pkg/dev_compiler/test/modular_suite.dart index 4e1f4caa7f8..aeae86f841e 100644 --- a/pkg/dev_compiler/test/modular_suite.dart +++ b/pkg/dev_compiler/test/modular_suite.dart @@ -5,6 +5,8 @@ /// Test the modular compilation pipeline of ddc. /// /// This is a shell that runs multiple tests, one per folder under `data/`. +library; + import 'package:modular_test/src/io_pipeline.dart'; import 'package:modular_test/src/runner.dart'; diff --git a/pkg/dev_compiler/test/modular_suite_canary_unsound.dart b/pkg/dev_compiler/test/modular_suite_canary_unsound.dart index 298c3be557c..4aeff091480 100644 --- a/pkg/dev_compiler/test/modular_suite_canary_unsound.dart +++ b/pkg/dev_compiler/test/modular_suite_canary_unsound.dart @@ -6,6 +6,8 @@ /// sound null safety. /// /// This is a shell that runs multiple tests, one per folder under `data/`. +library; + import 'package:modular_test/src/io_pipeline.dart'; import 'package:modular_test/src/runner.dart'; diff --git a/pkg/dev_compiler/test/modular_suite_unsound.dart b/pkg/dev_compiler/test/modular_suite_unsound.dart index a650349119e..fc5d0b32f85 100644 --- a/pkg/dev_compiler/test/modular_suite_unsound.dart +++ b/pkg/dev_compiler/test/modular_suite_unsound.dart @@ -5,6 +5,8 @@ /// Test the modular compilation pipeline of ddc without sound null safety. /// /// This is a shell that runs multiple tests, one per folder under `data/`. +library; + import 'package:modular_test/src/io_pipeline.dart'; import 'package:modular_test/src/runner.dart'; diff --git a/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart b/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart index e55e97e4551..e9fe6e29272 100644 --- a/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart +++ b/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart @@ -5,6 +5,7 @@ /// Tool that consumes the .dill file of an entire dart-sdk and produces the /// corresponding JavaScript module. +library; import 'dart:io'; import 'package:dev_compiler/src/kernel/command.dart'; diff --git a/pkg/expect/lib/minitest.dart b/pkg/expect/lib/minitest.dart index f4dd0ed693a..c83375a104f 100644 --- a/pkg/expect/lib/minitest.dart +++ b/pkg/expect/lib/minitest.dart @@ -21,6 +21,8 @@ /// /// Eventually, it would be good to refactor those tests to use the expect /// package directly and remove this. +library; + import 'dart:async'; import 'package:expect/expect.dart'; diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml index ac8a5240cae..524c0a62c5b 100644 --- a/pkg/expect/pubspec.yaml +++ b/pkg/expect/pubspec.yaml @@ -9,7 +9,7 @@ description: >- test assertions. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/frontend_server/lib/compute_kernel.dart b/pkg/frontend_server/lib/compute_kernel.dart index a77542e172c..8a77911145e 100644 --- a/pkg/frontend_server/lib/compute_kernel.dart +++ b/pkg/frontend_server/lib/compute_kernel.dart @@ -7,6 +7,8 @@ /// A library to invoke the CFE to compute kernel summary files. /// /// Used by `utils/bazel/kernel_worker.dart`. +library; + import 'dart:async'; import 'dart:io'; diff --git a/pkg/frontend_server/pubspec.yaml b/pkg/frontend_server/pubspec.yaml index 6d17580d66f..ad9c59059c6 100644 --- a/pkg/frontend_server/pubspec.yaml +++ b/pkg/frontend_server/pubspec.yaml @@ -4,7 +4,7 @@ description: A resident kernel compiler publish_to: none environment: - sdk: '>=2.16.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/js_runtime/lib/synced/async_status_codes.dart b/pkg/js_runtime/lib/synced/async_status_codes.dart index a1190ff39c2..a3d9ceec34e 100644 --- a/pkg/js_runtime/lib/synced/async_status_codes.dart +++ b/pkg/js_runtime/lib/synced/async_status_codes.dart @@ -6,6 +6,7 @@ /// Codes that transformed sync*/async/async* functions use to communicate with /// js_helper functions. +library; const int SUCCESS = 0; const int ERROR = 1; diff --git a/pkg/js_runtime/pubspec.yaml b/pkg/js_runtime/pubspec.yaml index fe9036aa0f3..5ea7a56a85f 100644 --- a/pkg/js_runtime/pubspec.yaml +++ b/pkg/js_runtime/pubspec.yaml @@ -3,7 +3,7 @@ name: js_runtime publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: diff --git a/pkg/js_runtime/test/in_sync_test.dart b/pkg/js_runtime/test/in_sync_test.dart index be8828da4fa..eb2a8a7e987 100644 --- a/pkg/js_runtime/test/in_sync_test.dart +++ b/pkg/js_runtime/test/in_sync_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Test to verify that this package is in-sync with dart2js runtime libraries. +library; + import 'dart:io'; import 'package:_fe_analyzer_shared/src/util/relativize.dart'; diff --git a/pkg/js_shared/pubspec.yaml b/pkg/js_shared/pubspec.yaml index 88860765c91..51f89bc6fdd 100644 --- a/pkg/js_shared/pubspec.yaml +++ b/pkg/js_shared/pubspec.yaml @@ -3,7 +3,7 @@ name: js_shared publish_to: none environment: - sdk: '>=2.14.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: diff --git a/pkg/js_shared/test/in_sync_test.dart b/pkg/js_shared/test/in_sync_test.dart index e10c4d6b665..f1940da88f8 100644 --- a/pkg/js_shared/test/in_sync_test.dart +++ b/pkg/js_shared/test/in_sync_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Test to verify that this package is in-sync with shared runtime libraries. +library; + import 'dart:io'; import 'package:_fe_analyzer_shared/src/util/relativize.dart'; diff --git a/pkg/modular_test/lib/src/generic_runner.dart b/pkg/modular_test/lib/src/generic_runner.dart index e797d9dce99..bf1279e1f65 100644 --- a/pkg/modular_test/lib/src/generic_runner.dart +++ b/pkg/modular_test/lib/src/generic_runner.dart @@ -7,6 +7,8 @@ /// /// This library contains no logic related to the modular_test framework. It is /// used to help integrate tests with our test infrastructure. +library; + // TODO(sigmund): this library should move somewhere else. import 'dart:async'; diff --git a/pkg/modular_test/lib/src/io_pipeline.dart b/pkg/modular_test/lib/src/io_pipeline.dart index 059272219c5..9de675e2f43 100644 --- a/pkg/modular_test/lib/src/io_pipeline.dart +++ b/pkg/modular_test/lib/src/io_pipeline.dart @@ -5,6 +5,8 @@ /// An implementation of [Pipeline] that runs using IO. /// /// To define a step, implement [IOModularStep]. +library; + import 'dart:io'; import 'pipeline.dart'; diff --git a/pkg/modular_test/lib/src/loader.dart b/pkg/modular_test/lib/src/loader.dart index 7621df4afaf..f27eb0b0e02 100644 --- a/pkg/modular_test/lib/src/loader.dart +++ b/pkg/modular_test/lib/src/loader.dart @@ -12,6 +12,8 @@ /// * subfolders: each considered a module with multiple files /// * a modules.yaml file: a specification of dependencies between modules. /// The format is described in `test_specification_parser.dart`. +library; + import 'dart:io'; import 'suite.dart'; import 'test_specification_parser.dart'; diff --git a/pkg/modular_test/lib/src/memory_pipeline.dart b/pkg/modular_test/lib/src/memory_pipeline.dart index a8c87ac0d22..5c6fd6cf2c1 100644 --- a/pkg/modular_test/lib/src/memory_pipeline.dart +++ b/pkg/modular_test/lib/src/memory_pipeline.dart @@ -5,6 +5,8 @@ /// An implementation of [Pipeline] that runs in-memory. /// /// To define a step, implement [MemoryModularStep]. +library; + import 'pipeline.dart'; import 'suite.dart'; diff --git a/pkg/modular_test/lib/src/pipeline.dart b/pkg/modular_test/lib/src/pipeline.dart index 1b9d1bef5e8..1c2ddf97335 100644 --- a/pkg/modular_test/lib/src/pipeline.dart +++ b/pkg/modular_test/lib/src/pipeline.dart @@ -13,6 +13,8 @@ /// The IO-based implementation ensures hermeticity by copying data to different /// directories. The memory-based implementation ensures hemeticity by filtering /// out the data before invoking the next step. +library; + import 'suite.dart'; /// Describes a step in a modular compilation pipeline. diff --git a/pkg/modular_test/lib/src/runner.dart b/pkg/modular_test/lib/src/runner.dart index ef33748a683..5d7003d683b 100644 --- a/pkg/modular_test/lib/src/runner.dart +++ b/pkg/modular_test/lib/src/runner.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// A runner that executes a pipeline on a folder containing modular tests. +library; + import 'dart:io'; import 'package:args/args.dart'; diff --git a/pkg/modular_test/lib/src/suite.dart b/pkg/modular_test/lib/src/suite.dart index 21ae6311efc..709ae7ae27e 100644 --- a/pkg/modular_test/lib/src/suite.dart +++ b/pkg/modular_test/lib/src/suite.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Model for a modular test. +library; /// A modular test declares the structure of the test code: what files are /// grouped as a module and how modules depend on one another. diff --git a/pkg/modular_test/lib/src/test_specification_parser.dart b/pkg/modular_test/lib/src/test_specification_parser.dart index 2026ac7265b..dcd09c4517c 100644 --- a/pkg/modular_test/lib/src/test_specification_parser.dart +++ b/pkg/modular_test/lib/src/test_specification_parser.dart @@ -50,6 +50,8 @@ /// The framework is agnostic of what the flags are, but at this time we only /// use the name of experimental language features. These are then used to /// decide what options to pass to the tools that compile and run the tests. +library; + import 'package:yaml/yaml.dart'; /// Parses [contents] containing a module dependencies specification written in diff --git a/pkg/modular_test/pubspec.yaml b/pkg/modular_test/pubspec.yaml index 8292fc7e5be..4e85fb4847c 100644 --- a/pkg/modular_test/pubspec.yaml +++ b/pkg/modular_test/pubspec.yaml @@ -7,7 +7,7 @@ description: > pipeline of different SDK tools. environment: - sdk: '>=2.16.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/modular_test/test/io_pipeline_test.dart b/pkg/modular_test/test/io_pipeline_test.dart index 951cc0eda76..aa4e818f06e 100644 --- a/pkg/modular_test/test/io_pipeline_test.dart +++ b/pkg/modular_test/test/io_pipeline_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Unit test for in-memory pipelines. +library; + import 'dart:io'; import 'package:modular_test/src/io_pipeline.dart'; diff --git a/pkg/modular_test/test/loader/loader_test.dart b/pkg/modular_test/test/loader/loader_test.dart index 8e253900654..cf7de5c7b7e 100644 --- a/pkg/modular_test/test/loader/loader_test.dart +++ b/pkg/modular_test/test/loader/loader_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Tests that the logic to load, parse, and validate modular tests. +library; + import 'dart:io'; import 'package:test/test.dart'; diff --git a/pkg/modular_test/test/memory_pipeline_test.dart b/pkg/modular_test/test/memory_pipeline_test.dart index 40c1c7e39d7..98c1d006101 100644 --- a/pkg/modular_test/test/memory_pipeline_test.dart +++ b/pkg/modular_test/test/memory_pipeline_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Unit test for in-memory pipelines. +library; + import 'dart:async'; import 'package:modular_test/src/memory_pipeline.dart'; diff --git a/pkg/modular_test/test/pipeline_common.dart b/pkg/modular_test/test/pipeline_common.dart index 8d392ac0621..7cef7e3eff5 100644 --- a/pkg/modular_test/test/pipeline_common.dart +++ b/pkg/modular_test/test/pipeline_common.dart @@ -10,6 +10,8 @@ /// /// We place most of the logic here to guarantee that the two different pipeline /// implementations are consistent with each other. +library; + import 'dart:async'; import 'package:test/test.dart'; diff --git a/pkg/modular_test/test/validate_pipeline_test.dart b/pkg/modular_test/test/validate_pipeline_test.dart index 90711a6234a..1e5135b76ed 100644 --- a/pkg/modular_test/test/validate_pipeline_test.dart +++ b/pkg/modular_test/test/validate_pipeline_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Unit test for validation of modular steps in a pipeline. +library; + import 'package:test/test.dart'; import 'package:modular_test/src/suite.dart'; import 'package:modular_test/src/pipeline.dart'; diff --git a/pkg/modular_test/test/validate_suite_test.dart b/pkg/modular_test/test/validate_suite_test.dart index 509344493ad..742a9ef4f3b 100644 --- a/pkg/modular_test/test/validate_suite_test.dart +++ b/pkg/modular_test/test/validate_suite_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Unit test for validation of modular steps in a pipeline. +library; + import 'package:test/test.dart'; import 'package:modular_test/src/suite.dart'; diff --git a/pkg/pkg.dart b/pkg/pkg.dart index 0cc17e68274..887037f0b11 100644 --- a/pkg/pkg.dart +++ b/pkg/pkg.dart @@ -4,6 +4,7 @@ /// List the packages in pkg/ as well information about their /// analysis_options.yaml configuration. +library; import 'dart:io'; diff --git a/pkg/status_file/bin/format.dart b/pkg/status_file/bin/format.dart index eb0f2f41955..2c58e849007 100644 --- a/pkg/status_file/bin/format.dart +++ b/pkg/status_file/bin/format.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Reformats the status file(s) at the given path. +library; + import 'dart:io'; import 'package:status_file/status_file.dart'; diff --git a/pkg/status_file/lib/canonical_status_file.dart b/pkg/status_file/lib/canonical_status_file.dart index 750e9fa30b5..d0e2d609917 100644 --- a/pkg/status_file/lib/canonical_status_file.dart +++ b/pkg/status_file/lib/canonical_status_file.dart @@ -347,11 +347,12 @@ class Comment { abstract class Entry { /// The one-based line number where the entry appears in the file. final int lineNumber; + Entry(this.lineNumber); } class EmptyEntry extends Entry { - EmptyEntry(lineNumber) : super(lineNumber); + EmptyEntry(super.lineNumber); @override String toString() { @@ -361,7 +362,8 @@ class EmptyEntry extends Entry { class CommentEntry extends Entry { final Comment comment; - CommentEntry(lineNumber, this.comment) : super(lineNumber); + + CommentEntry(super.lineNumber, this.comment); @override String toString() { @@ -375,8 +377,7 @@ class StatusEntry extends Entry { final List expectations; final Comment? comment; - StatusEntry(this.path, lineNumber, this.expectations, this.comment) - : super(lineNumber); + StatusEntry(this.path, super.lineNumber, this.expectations, this.comment); @override String toString() { diff --git a/pkg/status_file/pubspec.yaml b/pkg/status_file/pubspec.yaml index 5d73b18bbc0..43930c808fb 100644 --- a/pkg/status_file/pubspec.yaml +++ b/pkg/status_file/pubspec.yaml @@ -3,7 +3,7 @@ name: status_file publish_to: none environment: - sdk: "^2.12.0" + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/status_file/test/parse_and_normalize_test.dart b/pkg/status_file/test/parse_and_normalize_test.dart index 841af03e9e6..8d64c30e14a 100644 --- a/pkg/status_file/test/parse_and_normalize_test.dart +++ b/pkg/status_file/test/parse_and_normalize_test.dart @@ -4,6 +4,8 @@ /// Tests that every .status file in the Dart repository can be successfully /// parsed. +library; + import 'dart:io'; import 'package:status_file/canonical_status_file.dart'; diff --git a/pkg/status_file/test/repo_status_files_test.dart b/pkg/status_file/test/repo_status_files_test.dart index 1a910b4215b..5e845a2392b 100644 --- a/pkg/status_file/test/repo_status_files_test.dart +++ b/pkg/status_file/test/repo_status_files_test.dart @@ -4,6 +4,8 @@ /// Tests that every .status file in the Dart repository can be successfully /// parsed. +library; + import 'dart:io'; import 'package:expect/expect.dart'; diff --git a/pkg/test_runner/bin/launch_browser.dart b/pkg/test_runner/bin/launch_browser.dart index 4857bbc3278..925505ed188 100644 --- a/pkg/test_runner/bin/launch_browser.dart +++ b/pkg/test_runner/bin/launch_browser.dart @@ -7,6 +7,7 @@ /// The usage is: /// DARTBIN launch_browser.dart BROWSER_NAME URL /// DARTBIN should be the checked in stable binary. +library; import 'package:test_runner/src/browser_controller.dart'; import 'package:test_runner/src/configuration.dart'; diff --git a/pkg/test_runner/lib/bot_results.dart b/pkg/test_runner/lib/bot_results.dart index 6d5f111c9ef..39dc9704d1b 100644 --- a/pkg/test_runner/lib/bot_results.dart +++ b/pkg/test_runner/lib/bot_results.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Parses results.json and flaky.json. +library; import 'dart:async'; import 'dart:convert'; diff --git a/pkg/test_runner/lib/src/command.dart b/pkg/test_runner/lib/src/command.dart index 77fa6bc5cd5..7d756221875 100644 --- a/pkg/test_runner/lib/src/command.dart +++ b/pkg/test_runner/lib/src/command.dart @@ -90,11 +90,11 @@ class ProcessCommand extends Command { /// Working directory for the command. final String? workingDirectory; - ProcessCommand(String displayName, this.executable, this.arguments, + ProcessCommand(super.displayName, this.executable, this.arguments, [this.environmentOverrides = const {}, this.workingDirectory, int index = 0]) - : super._(displayName, index: index) { + : super._(index: index) { if (io.Platform.operatingSystem == 'windows') { // Windows can't handle the first command if it is a .bat file or the like // with the slashes going the other direction. @@ -979,8 +979,7 @@ class Dart2WasmCommandLineCommand extends ProcessCommand { /// [ScriptCommand]s are executed by dart code. abstract class ScriptCommand extends Command { - ScriptCommand._(String displayName, {int index = 0}) - : super._(displayName, index: index); + ScriptCommand._(super.displayName) : super._(); Future run(); } diff --git a/pkg/test_runner/lib/src/command_output.dart b/pkg/test_runner/lib/src/command_output.dart index 2e0ffe1e84f..808cd6099d4 100644 --- a/pkg/test_runner/lib/src/command_output.dart +++ b/pkg/test_runner/lib/src/command_output.dart @@ -1091,16 +1091,8 @@ class Dart2jsCompilerCommandOutput extends CompilationCommandOutput static final _errorRegexp = RegExp(r"^([^:]+):(\d+):(\d+):\n(Error): (.*)$", multiLine: true); - Dart2jsCompilerCommandOutput( - Command command, - int exitCode, - bool timedOut, - List stdout, - List stderr, - Duration time, - bool compilationSkipped) - : super(command, exitCode, timedOut, stdout, stderr, time, - compilationSkipped); + Dart2jsCompilerCommandOutput(super.command, super.exitCode, super.timedOut, + super.stdout, super.stderr, super.time, super.compilationSkipped); @override void _parseErrors() { @@ -1130,16 +1122,8 @@ class Dart2WasmCompilerCommandOutput extends CompilationCommandOutput static final _errorRegexp = RegExp(r"^([^:]+):(\d+):(\d+): (Error): (.*)$", multiLine: true); - Dart2WasmCompilerCommandOutput( - Command command, - int exitCode, - bool timedOut, - List stdout, - List stderr, - Duration time, - bool compilationSkipped) - : super(command, exitCode, timedOut, stdout, stderr, time, - compilationSkipped); + Dart2WasmCompilerCommandOutput(super.command, super.exitCode, super.timedOut, + super.stdout, super.stderr, super.time, super.compilationSkipped); @override void _parseErrors() { @@ -1166,16 +1150,14 @@ class DevCompilerCommandOutput extends CommandOutput with _StaticErrorOutput { multiLine: true); DevCompilerCommandOutput( - Command command, - int exitCode, - bool timedOut, - List stdout, - List stderr, - Duration time, - bool compilationSkipped, - int pid) - : super(command, exitCode, timedOut, stdout, stderr, time, - compilationSkipped, pid); + super.command, + super.exitCode, + super.timedOut, + super.stdout, + super.stderr, + super.time, + super.compilationSkipped, + super.pid); @override Expectation result(TestCase testCase) { @@ -1229,15 +1211,13 @@ class DevCompilerCommandOutput extends CommandOutput with _StaticErrorOutput { class VMKernelCompilationCommandOutput extends CompilationCommandOutput { VMKernelCompilationCommandOutput( - Command command, - int exitCode, - bool timedOut, - List stdout, - List stderr, - Duration time, - bool compilationSkipped) - : super(command, exitCode, timedOut, stdout, stderr, time, - compilationSkipped); + super.command, + super.exitCode, + super.timedOut, + super.stdout, + super.stderr, + super.time, + super.compilationSkipped); @override bool get canRunDependentCommands { @@ -1475,16 +1455,8 @@ class FastaCommandOutput extends CompilationCommandOutput r"^(?:([^:]+):(\d+):(\d+): )?(Context|Error|Warning): (.*)$", multiLine: true); - FastaCommandOutput( - Command command, - int exitCode, - bool hasTimedOut, - List stdout, - List stderr, - Duration time, - bool compilationSkipped) - : super(command, exitCode, hasTimedOut, stdout, stderr, time, - compilationSkipped); + FastaCommandOutput(super.command, super.exitCode, super.hasTimedOut, + super.stdout, super.stderr, super.time, super.compilationSkipped); @override void _parseErrors() { diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart index b771f513b48..4522860a5c7 100644 --- a/pkg/test_runner/lib/src/compiler_configuration.dart +++ b/pkg/test_runner/lib/src/compiler_configuration.dart @@ -166,8 +166,7 @@ abstract class CompilerConfiguration { /// The "none" compiler. class NoneCompilerConfiguration extends CompilerConfiguration { - NoneCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + NoneCompilerConfiguration(super.configuration) : super._subclass(); @override final bool hasCompiler = false; @@ -205,8 +204,7 @@ class NoneCompilerConfiguration extends CompilerConfiguration { class VMKernelCompilerConfiguration extends CompilerConfiguration with VMKernelCompilerMixin { - VMKernelCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + VMKernelCompilerConfiguration(super.configuration) : super._subclass(); @override bool get _isAot => false; @@ -326,9 +324,8 @@ class PipelineCommand { class ComposedCompilerConfiguration extends CompilerConfiguration { final List pipelineCommands; - ComposedCompilerConfiguration( - TestConfiguration configuration, this.pipelineCommands) - : super._subclass(configuration); + ComposedCompilerConfiguration(super.configuration, this.pipelineCommands) + : super._subclass(); @override CommandArtifact computeCompilationArtifact(String tempDir, @@ -390,8 +387,7 @@ class ComposedCompilerConfiguration extends CompilerConfiguration { class Dart2jsCompilerConfiguration extends CompilerConfiguration { static final Map> _bootstrapDependenciesCache = {}; - Dart2jsCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + Dart2jsCompilerConfiguration(super.configuration) : super._subclass(); @override String computeCompilerPath() { @@ -526,8 +522,7 @@ class Dart2jsCompilerConfiguration extends CompilerConfiguration { /// Common configuration for dart2wasm-based tools, such as dart2wasm. class Dart2WasmCompilerConfiguration extends CompilerConfiguration { - Dart2WasmCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + Dart2WasmCompilerConfiguration(super.configuration) : super._subclass(); @override String computeCompilerPath() { @@ -631,7 +626,7 @@ class DevCompilerConfiguration extends CompilerConfiguration { /// targets are output. final String genDir; - DevCompilerConfiguration(TestConfiguration configuration) + DevCompilerConfiguration(super.configuration) : _soundNullSafety = configuration.nnbdMode == NnbdMode.strong, genDir = [ 'gen/utils/ddc/', @@ -641,7 +636,7 @@ class DevCompilerConfiguration extends CompilerConfiguration { 'stable', if (configuration.nnbdMode != NnbdMode.strong) '_unsound' ].join(), - super._subclass(configuration); + super._subclass(); @override String computeCompilerPath() { @@ -859,8 +854,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration @override bool get _isAot => true; - PrecompilerCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + PrecompilerCompilerConfiguration(super.configuration) : super._subclass(); @override int get timeoutMultiplier { @@ -1201,8 +1195,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration } class AppJitCompilerConfiguration extends CompilerConfiguration { - AppJitCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + AppJitCompilerConfiguration(super.configuration) : super._subclass(); @override int get timeoutMultiplier { @@ -1284,8 +1277,7 @@ class AppJitCompilerConfiguration extends CompilerConfiguration { /// Configuration for dartanalyzer. class AnalyzerCompilerConfiguration extends CompilerConfiguration { - AnalyzerCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + AnalyzerCompilerConfiguration(super.configuration) : super._subclass(); @override int get timeoutMultiplier => 4; @@ -1354,8 +1346,7 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration { /// Configuration for spec_parser. class SpecParserCompilerConfiguration extends CompilerConfiguration { - SpecParserCompilerConfiguration(TestConfiguration configuration) - : super._subclass(configuration); + SpecParserCompilerConfiguration(super.configuration) : super._subclass(); @override String computeCompilerPath() => 'tools/spec_parse.py'; diff --git a/pkg/test_runner/lib/src/multitest.dart b/pkg/test_runner/lib/src/multitest.dart index 26543875a75..7b21b39e3d2 100644 --- a/pkg/test_runner/lib/src/multitest.dart +++ b/pkg/test_runner/lib/src/multitest.dart @@ -66,6 +66,8 @@ /// ddd //# 07: static type warning /// fff /// ``` +library; + import "dart:io"; import "path.dart"; diff --git a/pkg/test_runner/lib/src/test_file.dart b/pkg/test_runner/lib/src/test_file.dart index 4518a34e9ba..3f431ba782b 100644 --- a/pkg/test_runner/lib/src/test_file.dart +++ b/pkg/test_runner/lib/src/test_file.dart @@ -337,7 +337,7 @@ class TestFile extends _TestFileBase { isVmIntermediateLanguageTest = false, super(null, Path("/fake/vm/cc/$name"), []); - TestFile._(Path suiteDirectory, Path path, List expectedErrors, + TestFile._(Path super.suiteDirectory, super.path, super.expectedErrors, {this.packages, required this.environment, required this.isMultitest, @@ -356,8 +356,7 @@ class TestFile extends _TestFileBase { hasCompileError = false, hasRuntimeError = false, hasStaticWarning = false, - hasCrash = false, - super(suiteDirectory, path, expectedErrors) { + hasCrash = false { assert(!isMultitest || dartOptions.isEmpty); } diff --git a/pkg/test_runner/lib/src/test_progress.dart b/pkg/test_runner/lib/src/test_progress.dart index 85f31006911..8c798cf74d5 100644 --- a/pkg/test_runner/lib/src/test_progress.dart +++ b/pkg/test_runner/lib/src/test_progress.dart @@ -445,14 +445,13 @@ abstract class ProgressIndicator extends EventListener { } abstract class CompactIndicator extends ProgressIndicator { - CompactIndicator(DateTime startTime) : super(startTime); + CompactIndicator(super.startTime); } class CompactProgressIndicator extends CompactIndicator { final Formatter _formatter; - CompactProgressIndicator(DateTime startTime, this._formatter) - : super(startTime); + CompactProgressIndicator(super.startTime, this._formatter); @override void _printDoneProgress(TestCase test) { @@ -474,7 +473,7 @@ class CompactProgressIndicator extends CompactIndicator { } class LineProgressIndicator extends ProgressIndicator { - LineProgressIndicator(DateTime startTime) : super(startTime); + LineProgressIndicator(super.startTime); @override void _printDoneProgress(TestCase test) { @@ -490,7 +489,7 @@ class LineProgressIndicator extends ProgressIndicator { class BuildbotProgressIndicator extends ProgressIndicator { static String? stepName; - BuildbotProgressIndicator(DateTime startTime) : super(startTime); + BuildbotProgressIndicator(super.startTime); @override void _printDoneProgress(TestCase test) { diff --git a/pkg/test_runner/lib/src/test_suite.dart b/pkg/test_runner/lib/src/test_suite.dart index 275cfb57fbd..cb7a61f77c4 100644 --- a/pkg/test_runner/lib/src/test_suite.dart +++ b/pkg/test_runner/lib/src/test_suite.dart @@ -10,6 +10,8 @@ /// and creating [TestCase]s for those files that meet the relevant criteria. /// - Preparing tests, including copying files and frameworks to temporary /// directories, and computing the command line and arguments to be run. +library; + import 'dart:io'; import 'dart:math'; diff --git a/pkg/test_runner/pubspec.yaml b/pkg/test_runner/pubspec.yaml index 713ec19ccb0..31396d4768a 100644 --- a/pkg/test_runner/pubspec.yaml +++ b/pkg/test_runner/pubspec.yaml @@ -7,7 +7,7 @@ name: test_runner publish_to: none environment: - sdk: '>=2.16.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: diff --git a/pkg/test_runner/tool/convert_multitest.dart b/pkg/test_runner/tool/convert_multitest.dart index 5f349cf3d6c..4b0ce36ab50 100644 --- a/pkg/test_runner/tool/convert_multitest.dart +++ b/pkg/test_runner/tool/convert_multitest.dart @@ -5,6 +5,7 @@ /// Converts a multi-test to a test using the new static error test framework /// (see https://github.com/dart-lang/sdk/wiki/Testing#static-error-tests) /// and a copy of the '/none' test. +library; import 'dart:collection'; import 'dart:convert'; diff --git a/pkg/test_runner/tool/orphan_files.dart b/pkg/test_runner/tool/orphan_files.dart index d5785de7fae..8021b099528 100644 --- a/pkg/test_runner/tool/orphan_files.dart +++ b/pkg/test_runner/tool/orphan_files.dart @@ -8,6 +8,8 @@ /// /// Usually this means that someone accidentally left off the "_test" and the /// file is supposed to be a test but is silently getting ignored. +library; + import 'dart:io'; import 'package:analyzer/dart/analysis/analysis_context.dart'; diff --git a/pkg/test_runner/tool/update_static_error_tests.dart b/pkg/test_runner/tool/update_static_error_tests.dart index bf34b696d8c..668ceb6f479 100644 --- a/pkg/test_runner/tool/update_static_error_tests.dart +++ b/pkg/test_runner/tool/update_static_error_tests.dart @@ -4,6 +4,8 @@ /// Regenerates the static error test markers inside static error tests based /// on the actual errors reported by analyzer and CFE. +library; + import 'dart:io'; import 'package:args/args.dart'; diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart index d2bdbb81b7f..1f78dd4041f 100644 --- a/pkg/vm/bin/kernel_service.dart +++ b/pkg/vm/bin/kernel_service.dart @@ -18,6 +18,7 @@ /// dart pkg/vm/bin/kernel_service.dart --train /// /// +library; import 'dart:async' show Future, ZoneSpecification, runZoned; import 'dart:collection' show UnmodifiableMapBase; diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart index 271447abe5d..0a6301f7000 100644 --- a/pkg/vm/lib/incremental_compiler.dart +++ b/pkg/vm/lib/incremental_compiler.dart @@ -4,6 +4,8 @@ /// Defines wrapper class around incremental compiler to support /// the flow, where incremental deltas can be rejected by VM. +library; + import 'dart:async'; import 'dart:developer'; diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart index c6d199f7bb8..e742b08fb45 100644 --- a/pkg/vm/lib/kernel_front_end.dart +++ b/pkg/vm/lib/kernel_front_end.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Defines the VM-specific translation of Dart source code to kernel binaries. +library; import 'dart:async'; import 'dart:io' show File, IOSink; diff --git a/pkg/vm/lib/testing/il_matchers.dart b/pkg/vm/lib/testing/il_matchers.dart index be157bfd7b8..3d256ab0fb4 100644 --- a/pkg/vm/lib/testing/il_matchers.dart +++ b/pkg/vm/lib/testing/il_matchers.dart @@ -5,6 +5,8 @@ /// A library to facilitate programmatic matching against flow graphs /// collected during IL tests. See runtime/docs/infra/il_tests.md for more /// info. +library; + import 'dart:io'; typedef Renamer = String Function(String); diff --git a/pkg/vm/lib/transformations/type_flow/analysis.dart b/pkg/vm/lib/transformations/type_flow/analysis.dart index bcfcae8f8b5..360e9fb65e5 100644 --- a/pkg/vm/lib/transformations/type_flow/analysis.dart +++ b/pkg/vm/lib/transformations/type_flow/analysis.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Global type flow analysis. +library; import 'dart:collection'; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/calls.dart b/pkg/vm/lib/transformations/type_flow/calls.dart index dd16279d343..e83825afbf1 100644 --- a/pkg/vm/lib/transformations/type_flow/calls.dart +++ b/pkg/vm/lib/transformations/type_flow/calls.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Declares classes which describe a call: selectors and arguments. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/native_code.dart b/pkg/vm/lib/transformations/type_flow/native_code.dart index 4a3444ae082..d8a85813f9a 100644 --- a/pkg/vm/lib/transformations/type_flow/native_code.dart +++ b/pkg/vm/lib/transformations/type_flow/native_code.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Handling of native code and entry points. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/rta.dart b/pkg/vm/lib/transformations/type_flow/rta.dart index 5dc9dc84aea..6009b99fbd8 100644 --- a/pkg/vm/lib/transformations/type_flow/rta.dart +++ b/pkg/vm/lib/transformations/type_flow/rta.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Rapid type analysis on kernel AST. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/summary.dart b/pkg/vm/lib/transformations/type_flow/summary.dart index 94733bcdd2b..8ca5d00a40a 100644 --- a/pkg/vm/lib/transformations/type_flow/summary.dart +++ b/pkg/vm/lib/transformations/type_flow/summary.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Type flow summary of a member, function or initializer. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart index 3b3a47f0b05..2e2f267ba59 100644 --- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart +++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Creation of type flow summaries out of kernel AST. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart index 89d8242d358..81bc828220a 100644 --- a/pkg/vm/lib/transformations/type_flow/transformer.dart +++ b/pkg/vm/lib/transformations/type_flow/transformer.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Transformations based on type flow analysis. +library; import 'dart:core' hide Type; diff --git a/pkg/vm/lib/transformations/type_flow/types.dart b/pkg/vm/lib/transformations/type_flow/types.dart index cc517df9140..22f0bb4b50e 100644 --- a/pkg/vm/lib/transformations/type_flow/types.dart +++ b/pkg/vm/lib/transformations/type_flow/types.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Declares the type system used by global type flow analysis. +library; import 'dart:core' hide Type; diff --git a/pkg/vm_service/java/version.properties b/pkg/vm_service/java/version.properties index 94ffe2ee6ac..b40abb14b70 100644 --- a/pkg/vm_service/java/version.properties +++ b/pkg/vm_service/java/version.properties @@ -1 +1 @@ -version=4.14 +version=4.13 diff --git a/pkg/vm_service/lib/src/vm_service.dart b/pkg/vm_service/lib/src/vm_service.dart index 7659cb39d0c..0dbb2549f1c 100644 --- a/pkg/vm_service/lib/src/vm_service.dart +++ b/pkg/vm_service/lib/src/vm_service.dart @@ -7,6 +7,7 @@ /// A library to access the VM Service API. /// /// The main entry-point for this library is the [VmService] class. +library; // ignore_for_file: overridden_fields diff --git a/pkg/vm_service/tool/dart/generate_dart.dart b/pkg/vm_service/tool/dart/generate_dart.dart index b1f88ef7e1f..032c9aed191 100644 --- a/pkg/vm_service/tool/dart/generate_dart.dart +++ b/pkg/vm_service/tool/dart/generate_dart.dart @@ -44,6 +44,7 @@ final String _headerCode = r''' /// A library to access the VM Service API. /// /// The main entry-point for this library is the [VmService] class. +library; // ignore_for_file: overridden_fields diff --git a/pkg/wasm_builder/lib/src/ir/ir.dart b/pkg/wasm_builder/lib/src/ir/ir.dart index 7b106dff366..5c81202ccee 100644 --- a/pkg/wasm_builder/lib/src/ir/ir.dart +++ b/pkg/wasm_builder/lib/src/ir/ir.dart @@ -4,6 +4,7 @@ /// IR types are considered logically immutable. // TODO(joshualitt): Make all of the ir types full immutable. +library; export 'data_segments.dart' show BaseDataSegment, DataSegment, DataSegments; export 'exports.dart' show Export, Exportable, Exports; diff --git a/pkg/wasm_builder/pubspec.yaml b/pkg/wasm_builder/pubspec.yaml index 05ece996ca1..cd01bc50bee 100644 --- a/pkg/wasm_builder/pubspec.yaml +++ b/pkg/wasm_builder/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none description: Generate binary Wasm modules environment: - sdk: '>=2.17.0' + sdk: '>=2.19.0 <3.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dev_dependency: diff --git a/sdk/lib/_internal/js_runtime/lib/synced/async_status_codes.dart b/sdk/lib/_internal/js_runtime/lib/synced/async_status_codes.dart index a1190ff39c2..a3d9ceec34e 100644 --- a/sdk/lib/_internal/js_runtime/lib/synced/async_status_codes.dart +++ b/sdk/lib/_internal/js_runtime/lib/synced/async_status_codes.dart @@ -6,6 +6,7 @@ /// Codes that transformed sync*/async/async* functions use to communicate with /// js_helper functions. +library; const int SUCCESS = 0; const int ERROR = 1; diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart index e6578fd72a5..18aa1734158 100644 --- a/tools/generate_package_config.dart +++ b/tools/generate_package_config.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// Generates the repo's ".dart_tool/package_config.json" file. +library; + import 'dart:convert'; import 'dart:io';