Unverified Commit aaa9cead authored by sigmundch's avatar sigmundch Committed by GitHub

[tool][web] Pass invoker flag to dart2js. (#122344)

[tool][web] Pass invoker flag to dart2js.
parent ee2fd4b8
...@@ -211,6 +211,7 @@ class Dart2JSTarget extends Dart2WebTarget { ...@@ -211,6 +211,7 @@ class Dart2JSTarget extends Dart2WebTarget {
artifacts.getArtifactPath(Artifact.dart2jsSnapshot, platform: TargetPlatform.web_javascript), artifacts.getArtifactPath(Artifact.dart2jsSnapshot, platform: TargetPlatform.web_javascript),
'--platform-binaries=$platformBinariesPath', '--platform-binaries=$platformBinariesPath',
...decodeCommaSeparated(environment.defines, kExtraFrontEndOptions), ...decodeCommaSeparated(environment.defines, kExtraFrontEndOptions),
'--invoker=flutter_tool',
if (nativeNullAssertions) if (nativeNullAssertions)
'--native-null-assertions', '--native-null-assertions',
if (buildMode == BuildMode.profile) if (buildMode == BuildMode.profile)
......
...@@ -335,6 +335,7 @@ void main() { ...@@ -335,6 +335,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -348,6 +349,7 @@ void main() { ...@@ -348,6 +349,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
...@@ -373,6 +375,7 @@ void main() { ...@@ -373,6 +375,7 @@ void main() {
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--enable-experiment=non-nullable', '--enable-experiment=non-nullable',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -387,6 +390,7 @@ void main() { ...@@ -387,6 +390,7 @@ void main() {
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--enable-experiment=non-nullable', '--enable-experiment=non-nullable',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
...@@ -408,6 +412,7 @@ void main() { ...@@ -408,6 +412,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -421,6 +426,7 @@ void main() { ...@@ -421,6 +426,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
...@@ -442,6 +448,7 @@ void main() { ...@@ -442,6 +448,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -455,6 +462,7 @@ void main() { ...@@ -455,6 +462,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
...@@ -476,6 +484,7 @@ void main() { ...@@ -476,6 +484,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'--native-null-assertions', '--native-null-assertions',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
...@@ -490,6 +499,7 @@ void main() { ...@@ -490,6 +499,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'--native-null-assertions', '--native-null-assertions',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
...@@ -512,6 +522,7 @@ void main() { ...@@ -512,6 +522,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -525,6 +536,7 @@ void main() { ...@@ -525,6 +536,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
'-O3', '-O3',
...@@ -545,6 +557,7 @@ void main() { ...@@ -545,6 +557,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -576,6 +589,7 @@ void main() { ...@@ -576,6 +589,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'-DFOO=bar', '-DFOO=bar',
'-DBAZ=qux', '-DBAZ=qux',
...@@ -591,6 +605,7 @@ void main() { ...@@ -591,6 +605,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'-DFOO=bar', '-DFOO=bar',
'-DBAZ=qux', '-DBAZ=qux',
...@@ -614,6 +629,7 @@ void main() { ...@@ -614,6 +629,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'-o', '-o',
environment.buildDir.childFile('app.dill').absolute.path, environment.buildDir.childFile('app.dill').absolute.path,
...@@ -626,6 +642,7 @@ void main() { ...@@ -626,6 +642,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.product=true', '-Ddart.vm.product=true',
'-O4', '-O4',
'-o', '-o',
...@@ -647,6 +664,7 @@ void main() { ...@@ -647,6 +664,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'-DFOO=bar', '-DFOO=bar',
'-DBAZ=qux', '-DBAZ=qux',
...@@ -662,6 +680,7 @@ void main() { ...@@ -662,6 +680,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'-DFOO=bar', '-DFOO=bar',
'-DBAZ=qux', '-DBAZ=qux',
...@@ -686,6 +705,7 @@ void main() { ...@@ -686,6 +705,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -699,6 +719,7 @@ void main() { ...@@ -699,6 +719,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
...@@ -722,6 +743,7 @@ void main() { ...@@ -722,6 +743,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-o', '-o',
...@@ -735,6 +757,7 @@ void main() { ...@@ -735,6 +757,7 @@ void main() {
command: <String>[ command: <String>[
...kDart2jsLinuxArgs, ...kDart2jsLinuxArgs,
'--platform-binaries=bin/cache/flutter_web_sdk/kernel', '--platform-binaries=bin/cache/flutter_web_sdk/kernel',
'--invoker=flutter_tool',
'-Ddart.vm.profile=true', '-Ddart.vm.profile=true',
'--no-source-maps', '--no-source-maps',
'-O4', '-O4',
......
...@@ -67,6 +67,7 @@ int x = 'String'; ...@@ -67,6 +67,7 @@ int x = 'String';
result.stderr, result.stderr,
contains("A value of type 'String' can't be assigned to a variable of type 'int'."), contains("A value of type 'String' can't be assigned to a variable of type 'int'."),
); );
expect(result.stderr, isNot(contains("Warning: The 'dart2js' entrypoint script is deprecated")));
expect(result.exitCode, 1); expect(result.exitCode, 1);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment