Skip to content

Commit fcdbd1c

Browse files
committed
Version 1.21.0-dev.2.0
Merge 057b9ce into dev
2 parents f5ebe7d + 057b9ce commit fcdbd1c

File tree

118 files changed

+11781
-5642
lines changed

Some content is hidden

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

118 files changed

+11781
-5642
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ env:
8080
matrix:
8181
allow_failures:
8282
- env: TEST=node
83+
- env: ANALYZER=master DDC_BROWSERS=ChromeCanaryTravis
8384
- env: ANALYZER=master DDC_BROWSERS=Firefox
8485
- env: ANALYZER=master CXX=g++
8586
notifications:

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ action("create_sdk") {
5757
"runtime/bin:dart",
5858
"utils/analysis_server",
5959
"utils/compiler:dart2js",
60+
"utils/compiler:utils_wrapper",
6061
"utils/dartanalyzer:generate_dartanalyzer_snapshot",
6162
"utils/dartanalyzer:generate_summary_spec",
6263
"utils/dartanalyzer:generate_summary_strong",

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## 1.21.0
2+
### Core library changes
3+
4+
* `dart:core`: `Set.difference` now takes a `Set<Object>` as argument.
25

36
### Language
47

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ vars = {
5656
"csslib_tag" : "@0.13.2",
5757
"dart2js_info_tag" : "@0.5.0",
5858
"dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
59-
"dart_style_tag": "@0.2.10",
59+
"dart_style_tag": "@v0.2.11+1",
6060
"dartdoc_tag" : "@v0.9.7+6",
6161
"fixnum_tag": "@0.10.5",
6262
"func_tag": "@0.1.0",

build/config/compiler/BUILD.gn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,10 +732,11 @@ config("optimize") {
732732
# Turn off optimizations.
733733
config("no_optimize") {
734734
if (is_win) {
735+
# The only difference on windows is that the inlining is less aggressive.
736+
# (We accept the default level). Otherwise it is very slow.
735737
cflags = [
736738
"/O2", # Do some optimizations.
737739
"/Oy-", # Disable omitting frame pointers, must be after /O2.
738-
"/Ob0", # Disable all inlining (on by default).
739740
]
740741
} else if (is_android) {
741742
# On Android we kind of optimize some things that don't affect debugging

pkg/analysis_server/lib/src/analysis_server.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,16 +1645,18 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
16451645
}
16461646
}
16471647

1648+
ContextBuilderOptions builderOptions = new ContextBuilderOptions();
1649+
builderOptions.defaultOptions = options;
1650+
builderOptions.defaultPackageFilePath = defaultPackageFilePath;
1651+
builderOptions.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
1652+
if (analysisServer.options.enablePubSummaryManager) {
1653+
builderOptions.pubSummaryManager = analysisServer.pubSummaryManager;
1654+
}
16481655
ContextBuilder builder = new ContextBuilder(resourceProvider,
1649-
analysisServer.sdkManager, analysisServer.overlayState);
1650-
builder.defaultOptions = options;
1656+
analysisServer.sdkManager, analysisServer.overlayState,
1657+
options: builderOptions);
16511658
builder.fileResolverProvider = analysisServer.fileResolverProvider;
16521659
builder.packageResolverProvider = analysisServer.packageResolverProvider;
1653-
builder.defaultPackageFilePath = defaultPackageFilePath;
1654-
builder.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
1655-
if (analysisServer.options.enablePubSummaryManager) {
1656-
builder.pubSummaryManager = analysisServer.pubSummaryManager;
1657-
}
16581660
return builder;
16591661
}
16601662

pkg/analysis_server/test/context_manager_test.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,9 +2707,11 @@ class TestContextManagerCallbacks extends ContextManagerCallbacks {
27072707
@override
27082708
ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) {
27092709
DartSdkManager sdkManager = new DartSdkManager('/', false);
2710-
ContextBuilder builder =
2711-
new ContextBuilder(resourceProvider, sdkManager, new ContentCache());
2712-
builder.defaultOptions = options;
2710+
ContextBuilderOptions builderOptions = new ContextBuilderOptions();
2711+
builderOptions.defaultOptions = options;
2712+
ContextBuilder builder = new ContextBuilder(
2713+
resourceProvider, sdkManager, new ContentCache(),
2714+
options: builderOptions);
27132715
return builder;
27142716
}
27152717

pkg/analyzer/lib/error/error.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,14 @@ abstract class ErrorCode {
298298
// Manually generated. You can mostly reproduce this list by running the
299299
// following command from the root of the analyzer package:
300300
//
301-
// > cat lib/src/dart/error/syntactic_errors.dart src/error/codes.dart |
301+
// > cat
302+
// lib/src/analysis_options/error/option_codes.dart';
303+
// lib/src/dart/error/hint_codes.dart';
304+
// lib/src/dart/error/lint_codes.dart';
305+
// lib/src/dart/error/todo_codes.dart';
306+
// lib/src/html/error/html_codes.dart';
307+
// lib/src/dart/error/syntactic_errors.dart
308+
// lib/src/error/codes.dart |
302309
// grep 'static const .*Code' |
303310
// awk '{print $3"."$4","}' |
304311
// sort > codes.txt
@@ -350,7 +357,8 @@ abstract class ErrorCode {
350357
CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
351358
CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
352359
CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
353-
CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
360+
CompileTimeErrorCode
361+
.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
354362
CompileTimeErrorCode.CONST_INSTANCE_FIELD,
355363
CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
356364
CompileTimeErrorCode.CONST_NOT_INITIALIZED,
@@ -444,7 +452,8 @@ abstract class ErrorCode {
444452
CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
445453
CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
446454
CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
447-
CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
455+
CompileTimeErrorCode
456+
.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
448457
CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
449458
CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
450459
CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
library analyzer.src.analysis_options.error.option_codes;
6+
7+
import 'package:analyzer/error/error.dart';
8+
9+
/**
10+
* The error codes used for errors in analysis options files. The convention for
11+
* this class is for the name of the error code to indicate the problem that
12+
* caused the error to be generated and for the error message to explain what is
13+
* wrong and, when appropriate, how the problem can be corrected.
14+
*/
15+
class AnalysisOptionsErrorCode extends ErrorCode {
16+
/**
17+
* An error code indicating that there is a syntactic error in the file.
18+
*
19+
* Parameters:
20+
* 0: the error message from the parse error
21+
*/
22+
static const AnalysisOptionsErrorCode PARSE_ERROR =
23+
const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
24+
25+
/**
26+
* Initialize a newly created error code to have the given [name].
27+
*/
28+
const AnalysisOptionsErrorCode(String name, String message,
29+
[String correction])
30+
: super(name, message, correction);
31+
32+
@override
33+
ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
34+
35+
@override
36+
ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
37+
}
38+
39+
/**
40+
* The error codes used for warnings in analysis options files. The convention
41+
* for this class is for the name of the error code to indicate the problem that
42+
* caused the error to be generated and for the error message to explain what is
43+
* wrong and, when appropriate, how the problem can be corrected.
44+
*/
45+
class AnalysisOptionsWarningCode extends ErrorCode {
46+
/**
47+
* An error code indicating that a plugin is being configured with an
48+
* unsupported option and legal options are provided.
49+
*
50+
* Parameters:
51+
* 0: the plugin name
52+
* 1: the unsupported option key
53+
* 2: legal values
54+
*/
55+
static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
56+
const AnalysisOptionsWarningCode(
57+
'UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
58+
"The option '{1}' isn't supported by '{0}'.",
59+
"Try using one of the supported options: {2}.");
60+
61+
/**
62+
* An error code indicating that a plugin is being configured with an
63+
* unsupported option where there is just one legal value.
64+
*
65+
* Parameters:
66+
* 0: the plugin name
67+
* 1: the unsupported option key
68+
* 2: the legal value
69+
*/
70+
static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
71+
const AnalysisOptionsWarningCode(
72+
'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
73+
"The option '{1}' isn't supported by '{0}'."
74+
"Try using the only supported option: '{2}'.");
75+
76+
/**
77+
* An error code indicating that an option entry is being configured with an
78+
* unsupported value.
79+
*
80+
* Parameters:
81+
* 0: the option name
82+
* 1: the unsupported value
83+
* 2: legal values
84+
*/
85+
static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
86+
const AnalysisOptionsWarningCode(
87+
'UNSUPPORTED_VALUE',
88+
"The value '{1}' isn't supported by '{0}'.",
89+
"Try using one of the supported options: {2}.");
90+
91+
/**
92+
* An error code indicating that an unrecognized error code is being used to
93+
* specify an error filter.
94+
*
95+
* Parameters:
96+
* 0: the unrecognized error code
97+
*/
98+
static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
99+
const AnalysisOptionsWarningCode(
100+
'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
101+
102+
/**
103+
* Initialize a newly created warning code to have the given [name].
104+
*/
105+
const AnalysisOptionsWarningCode(String name, String message,
106+
[String correction])
107+
: super(name, message, correction);
108+
109+
@override
110+
ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
111+
112+
@override
113+
ErrorType get type => ErrorType.STATIC_WARNING;
114+
}

0 commit comments

Comments
 (0)