Version 1.16.0-dev.5.1
Cherry-pick 4bed72be27baace2473553dc282a847679191dfe to dev
Cherry-pick bcd8ef3dea0caffa6a715191cc937fe48076dc81 to dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5497a37..af5ee69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,10 @@
* Both `pub get` and `pub upgrade` now have a `--no-precompile` flag that
disables precompilation of executables and transformed dependencies.
+ * `pub publish` now resolves symlinks when publishing from a Git repository.
+ This matches the behavior it always had when publishing a package that
+ wasn't in a Git repository.
+
* Dart Dev Compiler
* The **experimental** `dartdevc` executable has been added to the SDK.
diff --git a/DEPS b/DEPS
index 9ae0509..c64cf6d 100644
--- a/DEPS
+++ b/DEPS
@@ -72,7 +72,7 @@
"plugin_tag": "@0.1.0",
"pool_tag": "@1.2.1",
"protobuf_tag": "@0.5.0+1",
- "pub_rev": "@c1405b945c6d818c8cfe78334e8d4b11fd913103",
+ "pub_rev": "@5257a0630a8db4f1ae339910eef5080ce384afc7",
"pub_cache_tag": "@v0.1.0",
"pub_semver_tag": "@1.2.1",
"quiver_tag": "@0.21.4",
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 4a78b6b..123cabe 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -400,7 +400,6 @@
language:
enableGenericMethods: true
enableAsync: false
- enableConditionalDirectives: true
errors:
unused_local_variable: false
linter:
@@ -426,7 +425,6 @@
expect(context.analysisOptions.enableAsync, isFalse);
// * from `.analysis_options`:
expect(context.analysisOptions.enableGenericMethods, isTrue);
- expect(context.analysisOptions.enableConditionalDirectives, isTrue);
// * verify tests are excluded
expect(
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 2a75edf..96333ad 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1062,6 +1062,7 @@
/**
* Return `true` to enable interface libraries (DEP 40).
*/
+ @deprecated
bool get enableConditionalDirectives;
/**
@@ -1201,7 +1202,10 @@
/**
* A flag indicating whether interface libraries are to be supported (DEP 40).
*/
- bool enableConditionalDirectives = false;
+ bool get enableConditionalDirectives => true;
+
+ @deprecated
+ void set enableConditionalDirectives(_) {}
/**
* A flag indicating whether generic methods are to be supported (DEP 22).
@@ -1297,7 +1301,6 @@
dart2jsHint = options.dart2jsHint;
enableAssertMessage = options.enableAssertMessage;
enableAsync = options.enableAsync;
- enableConditionalDirectives = options.enableConditionalDirectives;
enableStrictCallChecks = options.enableStrictCallChecks;
enableGenericMethods = options.enableGenericMethods;
enableSuperMixins = options.enableSuperMixins;
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 4288f15..05c5713 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -68,7 +68,7 @@
}
test_configure_enableConditionalDirectives() {
- expect(analysisOptions.enableConditionalDirectives, false);
+ expect(analysisOptions.enableConditionalDirectives, true);
configureContext('''
analyzer:
language:
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 0f3a7da..9c0c244 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -49,8 +49,9 @@
static const String verbose = '--verbose';
static const String version = '--version';
- // Experimental flags.
static const String conditionalDirectives = '--conditional-directives';
+
+ // Experimental flags.
static const String genericMethodSyntax = '--generic-method-syntax';
}
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index f2ee6b2..0518e488 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -326,7 +326,6 @@
new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
new OptionHandler(Flags.allowMockCompilation, passThrough),
new OptionHandler(Flags.fastStartup, passThrough),
- new OptionHandler(Flags.conditionalDirectives, passThrough),
new OptionHandler(Flags.genericMethodSyntax, passThrough),
new OptionHandler('${Flags.minify}|-m', implyCompilation),
new OptionHandler(Flags.preserveUris, passThrough),
@@ -364,6 +363,10 @@
new OptionHandler(Flags.useContentSecurityPolicy, passThrough),
new OptionHandler(Flags.enableExperimentalMirrors, passThrough),
new OptionHandler(Flags.enableAssertMessage, passThrough),
+ // TODO(floitsch): remove conditional directives flag.
+ // We don't provide the info-message yet, since we haven't publicly
+ // launched the feature yet.
+ new OptionHandler(Flags.conditionalDirectives, (_) {}),
new OptionHandler('--enable-async', (_) {
diagnosticHandler.info(
"Option '--enable-async' is no longer needed. "
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index cede0d1..84c8a80 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -14,9 +14,6 @@
abstract class ParserOptions {
const ParserOptions();
- /// Support conditional directives, e.g., configurable imports.
- bool get enableConditionalDirectives;
-
/// Support parsing of generic method declarations, and invocations of
/// methods where type arguments are passed.
bool get enableGenericMethodSyntax;
@@ -148,9 +145,6 @@
/// reason for why an assertion fails. (experimental)
final bool enableAssertMessage;
- /// Whether to enable the experimental conditional directives feature.
- final bool enableConditionalDirectives;
-
/// Support parsing of generic method declarations, and invocations of
/// methods where type arguments are passed.
final bool enableGenericMethodSyntax;
@@ -285,8 +279,6 @@
emitJavaScript: !(_hasOption(options, '--output-type=dart') ||
_hasOption(options, '--output-type=dart-multi')),
enableAssertMessage: _hasOption(options, Flags.enableAssertMessage),
- enableConditionalDirectives:
- _hasOption(options, Flags.conditionalDirectives),
enableGenericMethodSyntax:
_hasOption(options, Flags.genericMethodSyntax),
enableExperimentalMirrors:
@@ -354,7 +346,6 @@
bool dumpInfo: false,
bool emitJavaScript: true,
bool enableAssertMessage: false,
- bool enableConditionalDirectives: false,
bool enableGenericMethodSyntax: false,
bool enableExperimentalMirrors: false,
bool enableMinification: false,
@@ -424,7 +415,6 @@
dumpInfo: dumpInfo,
emitJavaScript: emitJavaScript,
enableAssertMessage: enableAssertMessage,
- enableConditionalDirectives: enableConditionalDirectives,
enableGenericMethodSyntax: enableGenericMethodSyntax,
enableExperimentalMirrors: enableExperimentalMirrors,
enableMinification: enableMinification,
@@ -475,7 +465,6 @@
this.dumpInfo: false,
this.emitJavaScript: true,
this.enableAssertMessage: false,
- this.enableConditionalDirectives: false,
this.enableGenericMethodSyntax: false,
this.enableExperimentalMirrors: false,
this.enableMinification: false,
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart
index 0a8d68d..a584afb 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -184,11 +184,9 @@
Token parseConditionalUris(Token token) {
listener.beginConditionalUris(token);
int count = 0;
- if (parserOptions.enableConditionalDirectives) {
- while (optional('if', token)) {
- count++;
- token = parseConditionalUri(token);
- }
+ while (optional('if', token)) {
+ count++;
+ token = parseConditionalUri(token);
}
listener.endConditionalUris(count);
return token;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 76cde6b..87146f6 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -44,7 +44,9 @@
DEFINE_FLAG(bool, enable_debug_break, false, "Allow use of break \"message\".");
DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
-DEFINE_FLAG(bool, conditional_directives, false,
+// TODO(floitsch): remove the conditional-directive flag, once we publicly
+// committed to the current version.
+DEFINE_FLAG(bool, conditional_directives, true,
"Enable conditional directives");
DEFINE_FLAG(bool, warn_super, false,
"Warning if super initializer not last in initializer list.");
diff --git a/tests/compiler/dart2js/options_helper.dart b/tests/compiler/dart2js/options_helper.dart
index ecf9d3d5..5df9c08 100644
--- a/tests/compiler/dart2js/options_helper.dart
+++ b/tests/compiler/dart2js/options_helper.dart
@@ -20,6 +20,5 @@
}
class MockParserOptions implements ParserOptions {
- bool get enableConditionalDirectives => true;
bool get enableGenericMethodSyntax => true;
}
diff --git a/tests/language/config_import_test.dart b/tests/language/config_import_test.dart
index 96cf3e3..6573aa3 100644
--- a/tests/language/config_import_test.dart
+++ b/tests/language/config_import_test.dart
@@ -2,8 +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.
//
-// DartOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false --conditional-directives
-// VMOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false --conditional-directives
+// DartOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false
+// VMOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false
import 'package:expect/expect.dart';
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index 71180bb..c8c95f3 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -42,9 +42,6 @@
const_for_in_variable_test/01: MissingCompileTimeError # Issue 25161
-# Unsupported configuration specific imports.
-config_import_test: CompileTimeError # Issue 24579
-
# Please add new failing tests before this line.
# Section below is for invalid tests.
#
diff --git a/tools/VERSION b/tools/VERSION
index 933c4c2..0e28d7b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 16
PATCH 0
PRERELEASE 5
-PRERELEASE_PATCH 0
+PRERELEASE_PATCH 1