Skip to content

Commit

Permalink
Add non-NNBD language version marker to all sdk (non-nnbd) files
Browse files Browse the repository at this point in the history
This is practically a copy of the change in
https://dart-review.googlesource.com/c/sdk/+/118040 but applied to the non-nnbd
sdk.

Even though there is no intent to run the non-nnbd sdk with the non-nullable
experiment, we need to add this annotation because of how we
intend to gradually start testing NNBD. The libraries.json under
sdk_nnbd is allowed to point to libraries under the non-nnbd sdk in order to
temporarily build without errors until all patch files are migrated and all CFE
issues are addressed.

Change-Id: I53c1123a8d86c10695832a8a0ad35adb7b4d92fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125181
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
  • Loading branch information
sigmundch authored and commit-bot@chromium.org committed Nov 15, 2019
1 parent ebd9af9 commit a75ffc8
Show file tree
Hide file tree
Showing 344 changed files with 695 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ import 'source_loader.dart' show SourceLoader;

// TODO(johnniwinther,jensj): Replace this with the correct scheme.
const int enableNonNullableDefaultMajorVersion = 2;
const int enableNonNullableDefaultMinorVersion = 6;
const int enableNonNullableDefaultMinorVersion = 7;

class SourceLibraryBuilder extends LibraryBuilderImpl {
static const String MALFORMED_URI_SCHEME = "org-dartlang-malformed-uri";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ library;
//
// class C extends Iterable<Object> {
// ^
// sdk/lib/core/iterable.dart:154:19: Context: 'Iterable.iterator' is defined here.
// sdk/lib/core/iterable.dart:156:19: Context: 'Iterable.iterator' is defined here.
// Iterator<E> get iterator;
// ^^^^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ library;
//
// class C extends Iterable<Object> {
// ^
// sdk/lib/core/iterable.dart:154:19: Context: 'Iterable.iterator' is defined here.
// sdk/lib/core/iterable.dart:156:19: Context: 'Iterable.iterator' is defined here.
// Iterator<E> get iterator;
// ^^^^^^^^
//
// pkg/front_end/testcases/general/sdk_diagnostic.dart:12:8: Error: Too few positional arguments: 1 required, 0 given.
// print(incorrectArgument: "fisk");
// ^
// sdk/lib/core/print.dart:8:6: Context: Found this candidate, but the arguments don't match.
// sdk/lib/core/print.dart:10:6: Context: Found this candidate, but the arguments don't match.
// void print(Object object) {
// ^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ library;
//
// class C extends Iterable<Object> {
// ^
// sdk/lib/core/iterable.dart:154:19: Context: 'Iterable.iterator' is defined here.
// sdk/lib/core/iterable.dart:156:19: Context: 'Iterable.iterator' is defined here.
// Iterator<E> get iterator;
// ^^^^^^^^
//
// pkg/front_end/testcases/general/sdk_diagnostic.dart:12:8: Error: Too few positional arguments: 1 required, 0 given.
// print(incorrectArgument: "fisk");
// ^
// sdk/lib/core/print.dart:8:6: Context: Found this candidate, but the arguments don't match.
// sdk/lib/core/print.dart:10:6: Context: Found this candidate, but the arguments don't match.
// void print(Object object) {
// ^^^^^
//
Expand Down
2 changes: 2 additions & 0 deletions runtime/bin/vmservice/loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of vmservice_io;

_sanitizeWindowsPath(path) {
Expand Down
2 changes: 2 additions & 0 deletions runtime/bin/vmservice/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of vmservice_io;

final bool silentObservatory = new bool.fromEnvironment('SILENT_OBSERVATORY');
Expand Down
2 changes: 2 additions & 0 deletions runtime/bin/vmservice/vmservice_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

library vmservice_io;

import 'dart:async';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ List<String> stops = [];
List<String> expected = [
"$file:${LINE + 0}:17", // on "Foo" (in "new Foo()")
"$file:${LINE + 1}:11", // on "="
"list.dart:105:24", // on parameter to "contains"
"list.dart:106:23", // on "length" in "this.length"
"list.dart:107:16", // on "=" in "i = 0"
"list.dart:107:23", // on "<" in "i < length"
"list.dart:108:15", // on "[" in "this[i]"
"list.dart:107:24", // on parameter to "contains"
"list.dart:108:23", // on "length" in "this.length"
"list.dart:109:16", // on "=" in "i = 0"
"list.dart:109:23", // on "<" in "i < length"
"list.dart:110:15", // on "[" in "this[i]"
"$file:${LINE + 13}:23", // on parameter in "operator []"
"$file:${LINE + 14}:5", // on "return"
"list.dart:108:19", // on "=="
"list.dart:109:26", // on "length" in "this.length"
"list.dart:109:18", // on "!="
"list.dart:107:34", // on "++" in "i++"
"list.dart:107:23", // on "<" in "i < length"
"list.dart:113:5", // on "return"
"list.dart:110:19", // on "=="
"list.dart:111:26", // on "length" in "this.length"
"list.dart:111:18", // on "!="
"list.dart:109:34", // on "++" in "i++"
"list.dart:109:23", // on "<" in "i < length"
"list.dart:115:5", // on "return"
"$file:${LINE + 4}:5", // on "print"
"$file:${LINE + 6}:1" // on ending '}'
];
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/crypto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

class _CryptoUtils {
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

library dart._http;

import 'dart:async';
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http_date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

/**
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http_headers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

class _HttpHeaders implements HttpHeaders {
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

int _nextServiceId = 1;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

// Global constants.
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/http_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

const String _DART_SESSION_ID = "DARTSESSID";
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/overrides.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

final _httpOverridesToken = new Object();
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/websocket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

/**
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_http/websocket_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._http;

const String _webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// DDC version of sdk/lib/js/dart2js/js_dart2js.dart

/// Low-level support for interoperating with JavaScript.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

/// Utility methods to efficiently manipulate typed JSInterop objects in cases
/// where the name to call is not known at runtime. You should only use these
/// methods when the same effect cannot be achieved with @JS annotations.
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/libraries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

library libraries;

/**
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for the dart:async library.

import 'dart:_js_helper' show notNull, patch, ReifyFunctionTypes;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/cli_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

import 'dart:_js_helper' show patch;

@patch
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for dart:collection classes.
import 'dart:_foreign_helper' show JS, JSExportName;
import 'dart:_runtime' as dart;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/convert_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for dart:convert library.

import 'dart:_js_helper' show argumentErrorValue, patch;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for dart:core classes.
import "dart:_internal" as _symbol_dev;
import 'dart:_interceptors';
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for dart:developer library.

import 'dart:_js_helper' show patch, ForceInline, ReifyFunctionTypes;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

import 'dart:core' hide Symbol;
import 'dart:core' as core show Symbol;
import 'dart:_js_primitives' show printString;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

import 'dart:_js_helper' show patch;
import 'dart:async';
import 'dart:convert';
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for the dart:isolate library.

import 'dart:_js_helper' show patch, NoReifyGeneric;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/math_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch file for dart:math library.
import 'dart:_foreign_helper' show JS;
import 'dart:_js_helper' show patch, nullCheck, notNull;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/mirrors_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

// Patch library for dart:mirrors.

import 'dart:_js_helper' show patch;
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/patch/typed_data_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

import 'dart:collection';
import 'dart:_js_helper' show patch;
import 'dart:_native_typed_data';
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/private/annotations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._js_helper;

/// Tells the optimizing compiler to always inline the annotated method.
Expand Down
2 changes: 2 additions & 0 deletions sdk/lib/_internal/js_dev_runtime/private/custom_hash_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._js_helper;

class CustomKeyHashMap<K, V> extends CustomHashMap<K, V> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

/// This library defines the operations that define and manipulate Dart
/// classes. Included in this are:
/// - Generics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

part of dart._runtime;

// We need to set these properties while the sdk is only partially initialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

/// This library defines runtime operations on objects used by the code
/// generator.
part of dart._runtime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

/// This library defines the association between runtime objects and
/// runtime types.
part of dart._runtime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

// @dart = 2.6

@ReifyFunctionTypes(false)
library dart._runtime;

Expand Down
Loading

0 comments on commit a75ffc8

Please sign in to comment.