mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
[cfe] Emit deprecation info for dartext: in 2.14
Closes #45758 Change-Id: I05384487ef1ef9f718a3123f8217c9aa3d4d8f32 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200879 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
9aa7e922f2
commit
10cabb4d08
|
@ -2161,6 +2161,18 @@ Message _withArgumentsDeferredPrefixDuplicatedCause(String name) {
|
|||
message: """'${name}' is used here.""", arguments: {'name': name});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeDeprecateDartExt = messageDeprecateDartExt;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messageDeprecateDartExt = const MessageCode(
|
||||
"DeprecateDartExt",
|
||||
severity: Severity.info,
|
||||
message:
|
||||
r"""Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.""",
|
||||
tip:
|
||||
r"""Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
|
|
|
@ -722,6 +722,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
|||
String nativePath;
|
||||
const String nativeExtensionScheme = "dart-ext:";
|
||||
if (uri.startsWith(nativeExtensionScheme)) {
|
||||
addProblem(messageDeprecateDartExt, charOffset, noLength, fileUri);
|
||||
String strippedUri = uri.substring(nativeExtensionScheme.length);
|
||||
if (strippedUri.startsWith("package")) {
|
||||
resolvedUri = resolve(this.importUri, strippedUri,
|
||||
|
|
|
@ -174,6 +174,8 @@ DeferredExtensionImport/analyzerCode: Fail
|
|||
DeferredExtensionImport/part_wrapped_script: Fail
|
||||
DeferredPrefixDuplicated/example: Fail
|
||||
DeferredTypeAnnotation/example: Fail
|
||||
DeprecateDartExt/analyzerCode: Fail
|
||||
DeprecateDartExt/part_wrapped_script: Fail # Example uses import declaration.
|
||||
DillOutlineSummary/analyzerCode: Fail
|
||||
DillOutlineSummary/example: Fail
|
||||
DirectiveAfterDeclaration/part_wrapped_script1: Fail
|
||||
|
|
|
@ -5180,3 +5180,10 @@ CompilingWithoutSoundNullSafety:
|
|||
script: |
|
||||
// @dart=2.9
|
||||
main() {}
|
||||
|
||||
DeprecateDartExt:
|
||||
template: "Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK."
|
||||
tip: "Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)"
|
||||
severity: INFO
|
||||
script: |
|
||||
import 'dart-ext:foo.dart';
|
||||
|
|
|
@ -34,6 +34,7 @@ f
|
|||
ffi
|
||||
flutter_runner
|
||||
futureor
|
||||
guides
|
||||
h
|
||||
https
|
||||
interop
|
||||
|
@ -42,6 +43,7 @@ js_util
|
|||
libraries.json
|
||||
list.filled
|
||||
loadlibrary
|
||||
migrate
|
||||
name.#name
|
||||
name.stack
|
||||
nameokempty
|
||||
|
|
|
@ -2,6 +2,24 @@
|
|||
@#C4
|
||||
@#C6
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:7:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:here';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:8:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:foo/../there';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:9:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:/usr/local/somewhere';
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
|
|
|
@ -2,6 +2,24 @@
|
|||
@dart._internal::ExternalName::•("dart-ext:foo/../there")
|
||||
@dart._internal::ExternalName::•("dart-ext:/usr/local/somewhere")
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:7:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:here';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:8:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:foo/../there';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:9:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:/usr/local/somewhere';
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
|
|
|
@ -2,6 +2,24 @@
|
|||
@#C4
|
||||
@#C6
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:7:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:here';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:8:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:foo/../there';
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/external_import.dart:9:1: Info: Dart native extensions are deprecated and will be removed in the 2.15 release of Dart SDK.
|
||||
// Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
|
||||
// import 'dart-ext:/usr/local/somewhere';
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
|
|
Loading…
Reference in a new issue