Skip to content

Commit 4e6ff19

Browse files
committed
Version 1.20.0-dev.10.0
Merge commit '9bd4406d4ba9db9cda26089136d5cc16415125b0' into dev
2 parents 6355939 + 9bd4406 commit 4e6ff19

File tree

99 files changed

+2027
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2027
-728
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ before_install:
3535
- export PATH=`pwd`/depot_tools:"$PATH"
3636

3737
# Checkout everything if we're building the SDK
38-
- 'gclient config --spec=''solutions = [ { "name": ".", "url": "[email protected]:dart-lang/sdk.git", "deps_file": "DEPS", "managed": False, "custom_vars": { "dart_root": "." } } ]'''
39-
- if [ "$CXX" ]; then gclient sync ; fi
38+
- cd ..
39+
- 'gclient config --spec=''solutions = [ { "name": "sdk", "url": "[email protected]:dart-lang/sdk.git", "deps_file": "DEPS", "managed": False } ]'''
40+
- gclient sync
41+
- cd sdk
4042

41-
# If a C++ compiler is set, built the SDK - else keep the preinstalled.
43+
# If a C++ compiler is set, build the SDK - else use the preinstalled SDK instead.
4244
- if [ "$CXX" ]; then ./tools/build.py -m release create_sdk ; fi
4345
- if [ "$CXX" ]; then export PATH=`pwd`/out/ReleaseX64/dart-sdk/bin:"$PATH" ; fi
4446
- dart --version
@@ -49,6 +51,8 @@ before_install:
4951
- export CHROME_CANARY_BIN=`./tool/get_chrome_canary.sh`
5052
- export DISPLAY=:99.0
5153
- sh -e /etc/init.d/xvfb start
54+
install:
55+
# Empty to suppress default pub get behavior
5256
before_script:
5357
# Node modules used by DDC
5458
- nvm install 5.5.0
@@ -69,7 +73,6 @@ matrix:
6973
allow_failures:
7074
- env: TEST=node
7175
- env: ANALYZER=master DDC_BROWSERS=Firefox
72-
- env: ANALYZER=master CXX=clang++
7376
- env: ANALYZER=master CXX=g++
7477
notifications:
7578
email:

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,32 @@
77
[article on native extensions](https://www.dartlang.org/articles/dart-vm/native-extensions)
88
to reflect the VM's improved behavior.
99

10-
* Linux builds of the VM will now use the tcmalloc library for memory
10+
* Linux builds of the VM will now use the `tcmalloc` library for memory
1111
allocation. This has the advantages of better debugging and profiling support
1212
and faster small allocations, with the cost of slightly larger initial memory
1313
footprint, and slightly slower large allocations.
1414

1515
* We have improved the way the VM searches for trusted root certificates for
1616
secure socket connections on Linux. First, the VM will look for trusted root
1717
certificates in standard locations on the file system
18-
(/etc/pki/tls/certs/ca-bundle.crt followed by /etc/ssl/certs), and only if
18+
(`/etc/pki/tls/certs/ca-bundle.crt` followed by `/etc/ssl/certs`), and only if
1919
these do not exist will it fall back on the builtin trusted root certificates.
2020
This behavior can be overridden on Linux with the new flags
21-
--root-certs-file and --root-certs-cache. The former is the path to a file
21+
`--root-certs-file` and `--root-certs-cache`. The former is the path to a file
2222
containing the trusted root certificates, and the latter is the path to a
2323
directory containing root certificate files hashed using `c_rehash`.
2424

25+
* The VM now throws a catchable `Error` when method compilation fails. This
26+
allows easier debugging of syntax errors, especially when testing.
27+
2528
### Core library changes
2629

2730
* `dart:core`: Remove deprecated `Resource` class.
2831
Use the class in `package:resource` instead.
2932
* `dart:async`
3033
* `Future.wait` now catches synchronous errors and returns them in the
3134
returned Future.
32-
* More aggressively returns a Future on Stream.cancel operations.
35+
* More aggressively returns a `Future` on `Stream.cancel` operations.
3336
Discourages to return `null` from `cancel`.
3437
* Fixes a few bugs where the cancel future wasn't passed through
3538
transformations.
@@ -115,6 +118,12 @@
115118
* Always split enum declarations if they end in a trailing comma.
116119
* Add `--set-exit-if-changed` to set the exit code on a change.
117120
121+
* Pub
122+
* Pub no longer generates a `packages/` directory by default. Instead, it
123+
generates a `.packages` file, called a package spec. To generate
124+
a `packages/` directory in addition to the package spec, use the
125+
`--packages-dir` flag with `pub get`, `pub upgrade`, and `pub downgrade`.
126+
118127
## 1.19.0
119128
120129
### Language changes

DEPS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ vars = {
3131
"co19_rev": "@d4767b4caea3c5828ad8e053cd051d44a59061af",
3232

3333
# Revisions of GN related dependencies.
34-
"buildtools_revision": "@565d04e8741429fb1b4f26d102f2c6c3b849edeb",
34+
"buildtools_revision": "@3d2e47bf14e4e67816a53e304dea422fa18f9180",
3535

3636
"gperftools_revision": "@7822b5b0b9fa7e016e1f6b46ea86f26f4691a457",
3737

@@ -44,7 +44,7 @@ vars = {
4444
"barback_tag" : "@0.15.2+9",
4545
"bazel_worker_tag": "@0.1.1",
4646
"boolean_selector_tag" : "@1.0.2",
47-
"boringssl_gen_rev": "@1e8e5da213d0d5b1d50fcc1356c4783091bcc20d",
47+
"boringssl_gen_rev": "@922830c0aad900dd3d143eef1ba06faa83fe263b",
4848
"boringssl_rev" : "@8d343b44bbab829d1a28fdef650ca95f7db4412e",
4949
"charcode_tag": "@1.1.0",
5050
"chrome_rev" : "@19997",
@@ -91,7 +91,7 @@ vars = {
9191
"pool_tag": "@1.2.4",
9292
"protobuf_tag": "@0.5.3",
9393
"pub_cache_tag": "@v0.1.0",
94-
"pub_rev": "@4ef3e3e8ad8089733d617505cc66fa3d8049b4ae",
94+
"pub_rev": "@3dd04bd17ba269ccdd34502a253041dd96ded3be",
9595
"pub_semver_tag": "@1.3.0",
9696
"quiver_tag": "@0.22.0",
9797
"resource_rev":"@a49101ba2deb29c728acba6fb86000a8f730f4b1",

build/config/android/config.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if (is_android) {
114114
arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
115115
mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
116116
x86_64_android_toolchain_root = "$android_ndk_root/toolchains/x86_64-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
117-
arm64_android_toolchain_root = "$android_ndk_root/toolchains/aarch64-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
117+
arm64_android_toolchain_root = "$android_ndk_root/toolchains/aarch64-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
118118
mips64_android_toolchain_root = "$android_ndk_root/toolchains/mips64el-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
119119

120120
# Location of libgcc. This is only needed for the current GN toolchain, so we

build/config/compiler/BUILD.gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ if (!is_win) {
5353
# where stuff should go. Put warning related stuff in the "warnings" config.
5454

5555
config("compiler") {
56+
asmflags = []
5657
cflags = []
5758
cflags_c = []
5859
cflags_cc = []
@@ -447,6 +448,14 @@ config("compiler") {
447448
}
448449
}
449450
}
451+
452+
# Assign any flags set for the C compiler to asmflags so that they are sent
453+
# to the assembler. The Windows assembler takes different types of flags
454+
# so only do so for posix platforms.
455+
if (is_posix) {
456+
asmflags += cflags
457+
asmflags += cflags_c
458+
}
450459
}
451460

452461
config("compiler_arm_fpu") {

build/toolchain/android/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ android_gcc_toolchains_helper("arm64") {
142142
android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir"
143143
android_ndk_lib_dir = "usr/lib"
144144

145-
tool_prefix = "$arm64_android_toolchain_root/bin/arm-linux-androideabi-"
145+
tool_prefix = "$arm64_android_toolchain_root/bin/aarch64-linux-android-"
146146
toolchain_cpu = "aarch64"
147147
}
148148

build/toolchain/gcc_toolchain.gni

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ template("gcc_toolchain") {
116116
tool("asm") {
117117
# For GCC we can just use the C compiler to compile assembly.
118118
depfile = "{{output}}.d"
119-
command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
119+
command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}"
120120
depsformat = "gcc"
121121
description = "ASM {{output}}"
122122
outputs = [
@@ -232,7 +232,7 @@ template("gcc_toolchain") {
232232

233233
# When invoking this toolchain not as the default one, these args will be
234234
# passed to the build. They are ignored when this is the default toolchain.
235-
toolchain_args() {
235+
toolchain_args = {
236236
current_cpu = invoker.toolchain_cpu
237237
current_os = invoker.toolchain_os
238238

build/toolchain/mac/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ template("mac_toolchain") {
8585
tool("asm") {
8686
# For GCC we can just use the C compiler to compile assembly.
8787
depfile = "{{output}}.d"
88-
command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
88+
command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{asmflags}} -c {{source}} -o {{output}}"
8989
depsformat = "gcc"
9090
description = "ASM {{output}}"
9191
outputs = [
@@ -193,7 +193,7 @@ template("mac_toolchain") {
193193
description = "COPY {{source}} {{output}}"
194194
}
195195

196-
toolchain_args() {
196+
toolchain_args = {
197197
current_cpu = invoker.toolchain_cpu
198198
current_os = invoker.toolchain_os
199199

build/toolchain/win/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ template("msvc_toolchain") {
121121
tool("asm") {
122122
# TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract
123123
# assembler flags to a variable like cflags. crbug.com/418613
124-
command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} /safeseh /c /Fo {{output}} {{source}}"
124+
command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} {{asmflags}} /safeseh /c /Fo {{output}} {{source}}"
125125
description = "ASM {{output}}"
126126
outputs = [
127127
"{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj",

docs/language/dartLangSpec.tex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,10 +2083,9 @@ \subsection{Mixin Application}
20832083
}
20842084

20852085
\LMHash{}
2086-
The effect of a class definition of the form \code{\CLASS{} $C$ = $M$; } or the form
2087-
\code{\CLASS{} $C<T_1, \ldots, T_n>$ = $M$; } in library $L$ is to introduce the name $C$ into the scope of $L$, bound to the class (\ref{classes}) defined by the mixin application $M$. The name of the class is also set to $C$. Iff the class is prefixed by the built-in identifier \ABSTRACT{}, the class being defined is an abstract class.
2086+
The effect of a class definition of the form \code{\CLASS{} $C$ = $M$; } or the form \code{\CLASS{} $C<T_1, \ldots, T_n>$ = $M$; } in library $L$ is to introduce the name $C$ into the scope of $L$, bound to the class (\ref{classes}) defined by the mixin application $M$. The name of the class is also set to $C$. Iff the class is prefixed by the built-in identifier \ABSTRACT{}, the class being defined is an abstract class.
20882087

2089-
Let $M_A$ be a mixin derived from a class $M$ with direct superclass $S_{static}$.
2088+
Let $M_A$ be a mixin derived from a class $M$ with direct superclass $S_{static}$, e.g., as defined by the class declaration \code{class M extends S$_{static}$ \{ \ldots \}}.
20902089

20912090
Let $A$ be an application of $M_A$. It is a static warning if the superclass of $A$ is not a subtype of $S_{static}$.
20922091

@@ -2469,8 +2468,8 @@ \subsection{Constants}
24692468
}
24702469

24712470
\begin{dartCode}
2472-
\CONST{} x = 1/0;
2473-
\FINAL{} y = 1/0;
2471+
\CONST{} x = 1 ~/ 0;
2472+
\FINAL{} y = 1 ~/ 0;
24742473

24752474
\CLASS{} K \{
24762475
m1() \{
@@ -2590,7 +2589,7 @@ \subsection{Numbers}
25902589
\end{grammar}
25912590

25922591
\LMHash{}
2593-
If a numeric literal begins with the prefix `0x' or `0X', it denotes the hexadecimal integer represented by the part of the literal following `0x' (respectively `0X'). Otherwise, if the numeric literal does not include a decimal point it denotes a decimal integer. Otherwise, the numeric literal denotes a 64 bit double precision floating point number as specified by the IEEE 754 standard.
2592+
If a numeric literal begins with the prefix `0x' or `0X', it denotes the hexadecimal integer represented by the part of the literal following `0x' (respectively `0X'). Otherwise, if the numeric literal contains only decimal digits, it denotes a decimal integer. Otherwise, the numeric literal contains either a decimal point or an exponent part and it denotes a 64 bit double precision floating point number as specified by the IEEE 754 standard.
25942593

25952594
\LMHash{}
25962595
In principle, the range of integers supported by a Dart implementations is unlimited. In practice, it is limited by available memory. Implementations may also be limited by other considerations.
@@ -2872,7 +2871,7 @@ \subsection{Symbols}
28722871
A symbol literal \code{\#id} where \code{id} does not begin with an underscore ('\code{\_}') is equivalent to the expression \code{\CONST{} Symbol('id')}.
28732872

28742873
\LMHash{}
2875-
A symbol literal \code{\#\_id} evaluates to the object that would be returned by the call \code{mirror.getPrivateSymbol('id')} where mirror is an instance of the class \code{LibraryMirror} defined in the library \code{dart:mirrors}, reflecting the current library.
2874+
A symbol literal \code{\#\_id} evaluates to the object that would be returned by the call \code{MirrorSystem.getSymbol("\_id", libraryMirror)} where \code{libraryMirror} is an instance of the class \code{LibraryMirror} defined in the library \code{dart:mirrors}, reflecting the current library.
28762875

28772876
\rationale{
28782877
One may well ask what is the motivation for introducing literal symbols? In some languages, symbols are canonicalized whereas strings are not. However literal strings are already canonicalized in Dart. Symbols are slightly easier to type compared to strings and their use can become strangely addictive, but this is not nearly sufficient justification for adding a literal form to the language. The primary motivation is related to the use of reflection and a web specific practice known as minification.

pkg/analysis_server/lib/src/services/correction/fix.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,12 @@ class DartFixKind {
165165
'CREATE_NO_SUCH_METHOD', 51, "Create 'noSuchMethod' method");
166166
static const IMPORT_LIBRARY_PREFIX = const FixKind('IMPORT_LIBRARY_PREFIX',
167167
51, "Use imported library '{0}' with prefix '{1}'");
168-
static const IMPORT_LIBRARY_PROJECT =
169-
const FixKind('IMPORT_LIBRARY_PROJECT', 49, "Import library '{0}'");
168+
static const IMPORT_LIBRARY_PROJECT1 =
169+
const FixKind('IMPORT_LIBRARY_PROJECT1', 47, "Import library '{0}'");
170+
static const IMPORT_LIBRARY_PROJECT2 =
171+
const FixKind('IMPORT_LIBRARY_PROJECT2', 48, "Import library '{0}'");
172+
static const IMPORT_LIBRARY_PROJECT3 =
173+
const FixKind('IMPORT_LIBRARY_PROJECT3', 49, "Import library '{0}'");
170174
static const IMPORT_LIBRARY_SDK =
171175
const FixKind('IMPORT_LIBRARY_SDK', 49, "Import library '{0}'");
172176
static const IMPORT_LIBRARY_SHOW =

pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,8 +1554,22 @@ class FixProcessor {
15541554
if (element.kind != kind) {
15551555
continue;
15561556
}
1557-
_addFix_importLibrary(
1558-
DartFixKind.IMPORT_LIBRARY_PROJECT, libraryElement);
1557+
// Compute the fix kind.
1558+
FixKind fixKind;
1559+
if (resourceProvider.pathContext
1560+
.split(librarySource.fullName)
1561+
.contains('src')) {
1562+
// Bad: non-API.
1563+
fixKind = DartFixKind.IMPORT_LIBRARY_PROJECT3;
1564+
} else if (element.library != libraryElement) {
1565+
// Ugly: exports.
1566+
fixKind = DartFixKind.IMPORT_LIBRARY_PROJECT2;
1567+
} else {
1568+
// Good: direct declaration.
1569+
fixKind = DartFixKind.IMPORT_LIBRARY_PROJECT1;
1570+
}
1571+
// Add the fix.
1572+
_addFix_importLibrary(fixKind, libraryElement);
15591573
}
15601574
}
15611575
}

0 commit comments

Comments
 (0)