Commit graph

1475 commits

Author SHA1 Message Date
Zach Anderson 46189bcb19 Allow configuring the destination of the SDK in the build output directory
This is needed for the Flutter Engine to use a prebuilt Dart SDK as in
https://github.com/flutter/engine/pull/26931. When using a prebuilt
Dart SDK, the rules producing the built SDK are directed to a
different location so that GN doesn't warn about multiple rules that
produce the same file.

TEST=locally with a flutter/engine checkout
Change-Id: I4095f379c772c63f93a1c88c7f4e44804f3a6fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204760
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-06-29 18:45:29 +00:00
Michal Terepeta 75e16cd318 Revert "Revert "Move most of the code from u/b/kernel_worker.dart to p/frontend_server""
This reverts commit e2cd8be814.

Now that we have dep override fixes in the Flutter Engine [1] we can
go forward with the original change.

[1] https://github.com/flutter/engine/pull/26564

Bug: http://b/187910394
Change-Id: I69f9ff5cd21b890e44fb1054df165c978abd4c5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202921
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-06-14 13:28:23 +00:00
Jake Macdonald e2cd8be814 Revert "Move most of the code from u/b/kernel_worker.dart to p/frontend_server"
This reverts commit 659fdae898.

Reason for revert: Broke the HHH bots.

The fix according to zra@ should be:

"The new dependencies should be added as dependency overrides to flutter_frontend_server's pubspec.yaml: https://github.com/flutter/engine/blob/master/flutter_frontend_server/pubspec.yaml"

Original change's description:
> Move most of the code from u/b/kernel_worker.dart to p/frontend_server
>
> This should allow us to import the code in cases when we want to
> implement the Bazel worker loop ourselves. This opens some possibilities
> of extra optimizations for internal use cases.
>
> I'm leaving some of the code (e.g., `main`) in the old location, so that
> we do not break anything that depends on it.
>
> The only thing that I've done is to pass the input-digest map to
> `computeKernel` instead of using `Input` objects directly, this way
> we can avoid the dependency on `package:bazel_worker` from
> `frontend_server`. So now, if we're using the worker loop, the map will
> be computed by `kernel_worker.dart` (in non-worker mode, we rely on
> the default empty map).
>
> Bug: http://b/187910394
> Change-Id: I408407ebdebc17c7898552c053a8e1c269cf2df5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201187
> Commit-Queue: Michal Terepeta <michalt@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: http://b/187910394
Change-Id: Ieb44d61b668a7d4629a27eef5a6ef61d0db9deaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-01 19:29:54 +00:00
Michal Terepeta 659fdae898 Move most of the code from u/b/kernel_worker.dart to p/frontend_server
This should allow us to import the code in cases when we want to
implement the Bazel worker loop ourselves. This opens some possibilities
of extra optimizations for internal use cases.

I'm leaving some of the code (e.g., `main`) in the old location, so that
we do not break anything that depends on it.

The only thing that I've done is to pass the input-digest map to
`computeKernel` instead of using `Input` objects directly, this way
we can avoid the dependency on `package:bazel_worker` from
`frontend_server`. So now, if we're using the worker loop, the map will
be computed by `kernel_worker.dart` (in non-worker mode, we rely on
the default empty map).

Bug: http://b/187910394
Change-Id: I408407ebdebc17c7898552c053a8e1c269cf2df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201187
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-31 13:47:14 +00:00
Zach Anderson cc02fd844b Use prebuilt dart to generate strong sdk summary
This saves ~5 minutes on Flutter Engine linux arm64 cross-builds.

Change-Id: I67d849422886101c217de7c2f21bc4eba4f6706a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201042
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-05-23 02:11:39 +00:00
Daco Harkes 35223586a3 Reland "[build] Use an absolute path for the snapshot"
When constructing the command line for creating the kernel service
snapshot, the variable `abs_output` actually contains a relative
path, which means that copy/pasting the generated command line fails
if not within the root build directory. This CL fixes that.

Previous revert: https://dart-review.googlesource.com/c/sdk/+/200940

Passes `--depfile-output-filename` with the path relative to the output
folder so that the written depfiles do not contain the absolute file
paths.

ninja only accepts paths relative to the build folder in the .d files.

Manually tested that the dependencies now work with running the
build twice:
`tools/build.py --no-start-goma -mrelease create_platform_sdk`

Inspecting the .d file in question that caused the revert:
`cat out/ReleaseX64/gen/kernel-service.dart.snapshot.d`

TEST=SDK build

Change-Id: Id781d2ed94ad7a0041e5899b8fded598de81242b
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200876
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-21 11:52:02 +00:00
Dan Field 195c163d7f Revert "[build] Use an absolute path for the snapshot."
This reverts commit 269828ed34.

Reason for revert: This causes subsequent builds to be dirty no matter what.

Original change's description:
> [build] Use an absolute path for the snapshot.
>
> When constructing the command line for creating the kernel service
> snapshot, the variable `abs_output` actually contains a relative
> path, which means that copy/pasting the generated command line fails
> if not within the root build directory. This CL fixes that.
>
> Change-Id: I0d9fcafac489a6bd4771de1d6db1a2aa3623dcf8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200861
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

TBR=dacoharkes@google.com,sstrickl@google.com

Change-Id: I601d3c878d65ad6294d8f20c8b53d119b251ff43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200940
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-21 06:15:38 +00:00
Tess Strickland 269828ed34 [build] Use an absolute path for the snapshot.
When constructing the command line for creating the kernel service
snapshot, the variable `abs_output` actually contains a relative
path, which means that copy/pasting the generated command line fails
if not within the root build directory. This CL fixes that.

Change-Id: I0d9fcafac489a6bd4771de1d6db1a2aa3623dcf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200861
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-20 09:43:30 +00:00
Ryan Macnak a22d5b98fd Reapply "[build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time."
Use a relative path for the depfile's target to match Ninja's expectation; otherwise it thinks the target is always dirty.

TEST=build twice
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I4cae7ab55f79b5206521c7090502c0769d2b5277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198443
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-12 00:27:28 +00:00
Ben Konyi b99466d472 Reland "[ VM / DDS / CLI ] Add DevTools support to the standalone VM"
This reverts commit 5cbf10febe.

TEST=pkg/dds/devtools_observatory_connection_test.dart

Change-Id: I682d009f784b930094dae9b7d4e9a66efffb6ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198561
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-11 17:55:26 +00:00
Ryan Macnak 5c0ff97acf Revert "[build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time."
This reverts commit 8d436a2011.

Reason for revert: ninja is always dirty

Original change's description:
> [build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time.
>
> Bug: https://github.com/flutter/flutter/issues/81074
> Change-Id: I3fba7743f89b970dfd8d4d47b21f7d51be7a9cdb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196981
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I74c9ce055ad49107ae0d21f2f3b9b74991fc81d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198441
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-05 23:26:14 +00:00
Ben Konyi 5cbf10febe Revert "[ VM / DDS / CLI ] Add DevTools support to the standalone VM"
This reverts commit ef0e4ea107.

Reason for revert: Flutter HHH and golem builds are red. Rolls to Flutter are failing.

TEST=N/A

Original change's description:
> [ VM / DDS / CLI ] Add DevTools support to the standalone VM
>
> Example output on stdout when DevTools is enabled:
>
> Observatory listening on http://127.0.0.1:8181/CzkZzZaONW4=/
> The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FCzkZzZaONW4%3D%2Fws
> hello world!
>
> vm-service: isolate(1674461414267555)  'main' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/CzkZzZaONW4=/ to debug.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: Icd1afda87ad4a46f228125d53094d10adf8056ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188361
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I50e8dc4e592e13b44c2fb980b2029d5c5cc3ad2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198381
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-05 20:31:07 +00:00
Ben Konyi ef0e4ea107 [ VM / DDS / CLI ] Add DevTools support to the standalone VM
Example output on stdout when DevTools is enabled:

Observatory listening on http://127.0.0.1:8181/CzkZzZaONW4=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FCzkZzZaONW4%3D%2Fws
hello world!

vm-service: isolate(1674461414267555)  'main' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/CzkZzZaONW4=/ to debug.

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: Icd1afda87ad4a46f228125d53094d10adf8056ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188361
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-03 18:24:09 +00:00
Ryan Macnak 8d436a2011 [build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time.
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I3fba7743f89b970dfd8d4d47b21f7d51be7a9cdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196981
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-28 23:10:34 +00:00
Ryan Macnak 605b211c89 Reapply "[build] Don't list Dart sources up front when creating application snapshots."
Fix `application_snapshot`'s depfile to track the sources of the application instead of the compiler. Split compiling the compiler into a separate GN target with its own depfile.

Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I0fb23ada40a6241ee3dde7f6cfebdd121b9a4224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197020
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-27 17:22:54 +00:00
Ryan Macnak 1305295051 Revert "[build] Don't list Dart sources up front when creating application snapshots."
This reverts commit a23c31bf8d.

Reason for revert: The bootstrapping compilations are a bit confused about whose deps they're writing

Original change's description:
> [build] Don't list Dart sources up front when creating application snapshots.
>
> GN/Ninja will discover them via the depfile created alongside the snapshot.
>
> Bug: https://github.com/flutter/flutter/issues/81074
> Change-Id: I6e0f07214e8ea29e6d23261c71558da06fd2223a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196982
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,chinmaygarde@google.com

Change-Id: I267b6bac2676a18f57291c8472fab5c2aaa60284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/81074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197000
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-26 23:53:39 +00:00
Ryan Macnak a23c31bf8d [build] Don't list Dart sources up front when creating application snapshots.
GN/Ninja will discover them via the depfile created alongside the snapshot.

Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I6e0f07214e8ea29e6d23261c71558da06fd2223a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196982
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-26 22:52:47 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

Fixes: https://github.com/dart-lang/sdk/issues/28793

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Ryan Macnak 5a385890b9 [test] Apply simarm64 status file entries to simarm64c.
Remove references to the removed simarmv6 architecture.

TEST=ci
Change-Id: I10e9fc8291c3e5b6b9a4bd71ca05de95e53f22c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-02-25 21:18:02 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00
Johnni Winther 91be638a56 Add support for --verbosity in bazel/kernel_worker
Change-Id: If1c1cd2feb1c5341c3b7631dfe12888ce7eac249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182221
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-02-02 15:25:44 +00:00
Ben Konyi c42c76f590 [ VM / CLI ] Run DartDev isolate from snapshot when possible
This change tries to run from dartdev.dart.snapshot and falls back to
running from dartdev.dill if incompatible VM flags are provided.

Fixes https://github.com/dart-lang/sdk/issues/43969

Performance results:

dart test.dart (no CLI isolate): 0.167s
dart run test (from snapshot):   0.208s
dart run test (from kernel):     0.326s

TEST=pkg/dartdev/test/load_from_dill_test.dart

Change-Id: I3195886b86676580ef2a0221f0284328964ef061
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178300
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-01-11 19:41:50 +00:00
Sigurd Meldgaard 00b7040dc8 Remove obsolete dartfix build target and scripts
The package was deleted in 224a997a23

Bug: https://github.com/dart-lang/sdk/issues/43863
Change-Id: I599ea7b594365ef244550c90f50bab15d116c937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170696
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2020-11-13 09:18:36 +00:00
Alexander Markov d014a0f59b Remove bytecode mode of Dart SDK build
This change cleans up build.py --bytecode and gn.py --bytecode options.

Change-Id: Ie251e7049ce3f8f9da28d35eda139b60ee23af98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167842
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-21 22:43:14 +00:00
Alexander Markov d966612cc3 Remove remaining bytecode benchmarks
Change-Id: I7baca41921a2f657dc658b9c3585832109b74a1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167880
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-16 20:21:32 +00:00
Leaf Petersen 745f112ef6 Opt out some files from null safety.
Opt an initial batch of files under samples, samples-dev,
utils, and runtime/tools/dartfuzz out of null safety in preparation
for switching the flag on by default.

Change-Id: Icdfd52a5a969e678a7205903332f73fe3841c223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166960
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-12 22:15:42 +00:00
Alexander Markov 28b6ccb85b [kernel_worker] Pass null safety mode to TargetFlags
Change-Id: I4b156e496c93b27315c876965911b8521545047d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-09-23 00:51:23 +00:00
Jacob MacDonald 1522a867ca add --strong-null-safety flag to the kernel worker
Bug:https://github.com/dart-lang/sdk/issues/43091
Change-Id: I716d2ea6cf1c95be3911c32b1b2958788fe917ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159183
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-08-19 18:57:47 +00:00
Ben Konyi 4fb4e0af2d [ VM / DartDev ] Run dartdev from kernel instead of AppJIT snapshot
Fixes https://github.com/dart-lang/sdk/issues/42804

Change-Id: I32b19e72f038131b00059fff2f2db61686a8db74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157601
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-10 22:26:24 +00:00
MichealReed 1d6e6851b7 [Compiler] Version Fix for Window Builds
Closes https://github.com/dart-lang/sdk/issues/31745
Closes https://github.com/dart-lang/sdk/issues/32036

Closes https://github.com/dart-lang/sdk/pull/42906
https://github.com/dart-lang/sdk/pull/42906

GitOrigin-RevId: c1803a462ea83edd80766bc2f105a5698f856b34
Change-Id: I6bb2ee58d9cd482b1dda4b01fa5a9e2e423a5d21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156920
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-06 18:17:12 +00:00
Clement Skau fd5140d491 [SDK] Fix VM/kernel version mix in build.
Several people have experienced build issues traced back to
target `//utils/dartanalyzer:generate_summary_strong`.
The issue is triggered by the sdk_hash changing with an old
kernel-service snapshot in the out/ folder.
`generate_summary_strong` uses but does not explicitly depend on
the kernel-service, causing the outdated dependency.
This then causes 'Unexpected Kernel SDK Version' when the new dart
binary tried to load the old kernel-service snapshot.

Tested:
1. Clean build of create_sdk at HEAD.
2. Empty `git commit --amend` to modify commit and thus sdk hash.
3. Rebuild of create_sdk (which failed before).

Cq-Include-Trybots: dart/try:analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-mac-release-try,analyzer-nnbd-linux-release-try,analyzer-win-release-try,benchmark-linux-try,dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,dart-sdk-win-try,flutter-analyze-try,front-end-linux-release-x64-try,pkg-linux-release-try,vm-kernel-linux-release-x64-try
Change-Id: Iba07e9d0c5daa7a93870fb501d9bb57682c88a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156913
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-08-05 11:46:28 +00:00
William Hesse 033a81d924 [build] Add dependencies to the strong summary generation
Change-Id: If3615f95ad60f5b33250bd0387fb35141cff0bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156687
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-07-31 20:49:29 +00:00
Ben Konyi 60fef97b0c [ DartDev / GN ] Updated build files to always copy dartdev and DDS
snapshots to the root build directory

Change-Id: I065baea33074d5f54310c8d132b5599f22cc2c50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156051
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-30 22:02:24 +00:00
Nicholas Shahan bad34bdb9d [ddc] Delete unused target dartdevc_patch_sdk
Change-Id: Ia15ffea7f5198125d6ce1b8b04ef8d830678d420
Fixes: https://github.com/dart-lang/sdk/issues/42825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156041
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-29 01:10:51 +00:00
Nicholas Shahan b98eb386ea [ddc] Use prebuilt_dart_action to build js
Start using the prebuilt_dart_action again to run ddc when compiling
packages to js.

This reverts the change made in
https://dart-review.googlesource.com/c/sdk/+/151400
that was needed when adding packages to the null safety allow list.

Change-Id: I291f127729c38c6bc22e3b74f87c38b9f11661c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155547
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-23 20:17:58 +00:00
Ben Konyi 157ebfe50f Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This reverts commit 7e373831ce.

Change-Id: Ib94d793a5753ec6352cd9a65e35f726a63336368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154830
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-21 16:23:18 +00:00
Alexander Aprelev 7e373831ce Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process""
This reverts commit bc4cb123a8.

Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619

Original change's description:
> Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
> 
> This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.
> 
> By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:
> 
> VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
> Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
> Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092)
> 
> This reverts commit 3849b5061c.
> 
> Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,asiva@google.com

Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
Ben Konyi bc4cb123a8 Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.

By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:

VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092)

This reverts commit 3849b5061c.

Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-17 00:54:11 +00:00
Ben Konyi 3849b5061c Revert "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"
This reverts commit ffe258d2d4.

Reason for revert: Failures on bots

Original change's description:
> [ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process
> 
> This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.
> 
> By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:
> 
> VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
> Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
> Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/41978)
> 
> Change-Id: I1c6b1425831b691ad20284716aa80f817dbaf607
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152588
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: Idb1d24a4524bdc3ccfb199a82710f3c0d9db539a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154702
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-16 19:50:57 +00:00
Ben Konyi ffe258d2d4 [ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process
This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process.

By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues:

VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630)
Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978)
Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/41978)

Change-Id: I1c6b1425831b691ad20284716aa80f817dbaf607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152588
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-07-16 19:03:24 +00:00
Martin Kustermann 90bba3ae27 [vm] Ensure SDK hash is correctly embedded for CFE and other tools that produce Kernel
The missing --short=10 was causing (depending on git version and
configuration) us to sometimes default to using '0000000000'.

Furthermore the build rules were missing two places where -Dsdk_hash has
to be set.

Issue https://github.com/dart-lang/sdk/issues/41802

Change-Id: I83dbfcce677e2594074c1139093bd9592d4fa3ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154684
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-07-16 18:43:24 +00:00
Nicholas Shahan 9460ac3c8d [ddc] Copy more .dill files to packaged sdk
Adds the sound full and outline as well as a weak full dill.

The outlines are required when compiling user applications. The full
dills will be used to compile the sdk to JS by the build system.

Change-Id: I74b3f1c34dba5fcdea2dfad07c6bf1af9c1e3f13
Issue: https://github.com/dart-lang/sdk/issues/42253
Fixes: https://github.com/dart-lang/sdk/issues/42083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153701
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-14 00:09:29 +00:00
Clement Skau 0ce83987d6 Reland "[SDK] Adds an SDK hash to kernels and the VM."
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343

Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

This also bumps the min. and current ABI version.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-07 06:08:20 +00:00
asiva bb8d145616 Revert "[SDK] Adds an SDK hash to kernels and the VM."
This reverts commit edde575dcd.

Reason for revert: Breaks the Dart to Flutter roll and golem

Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> Adds a new SDK hash to kernels and the VM which is optionally checked
> to verify kernels are built for the same SDK as the VM.
> This helps catch incompatibilities that are currently causing
> subtle bugs and (not so subtle) crashes.
>
> The SDK hash is encoded in kernels as a new field in components.
> The hash is derived from the 10 byte git short hash.
>
> This new check can be disabled via:
>   tools/gn.py ... --no-verify-sdk-hash
>
> This CL bumps the min. (and max.) supported kernel format version,
> making the VM backwards incompatible from this point back.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,jensj@google.com,cskau@google.com

Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-26 18:54:17 +00:00
Clement Skau edde575dcd [SDK] Adds an SDK hash to kernels and the VM.
Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-26 13:35:42 +00:00
Nicholas Shahan 7f268aba04 [ddc] Allow DDC to compile SDK from dill
This is the first step to removing all of the the sdks precompiled
to JS modules from the sdk download.

Enables build_runner to produce a JS file on demand from a .dill
file bundled in the sdk download. At this time, only the SDK can
be compiled from a .dill file.

Update build targets to run bin/dartdevc.dart instead of
tool/compile_dartdevc_sdk.dart.

Will delete tool/compile_dartdevc_sdk.dart after we cleanup all
of the uses outside of the SDK.

Change-Id: Id6002675419e8e502912cb3f5b626a0d13461df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151025
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-06-23 01:08:06 +00:00
Jacob MacDonald e7218354a8 add all flutter/flutter_test/test isolate deps to the allow list
I also had to migrate package:js to nnbd as a part of this

Bug:https://github.com/dart-lang/sdk/issues/42274
Change-Id: Ia0223e013d2afb464c05eba71783827cf1fb4781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151400
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-06-17 04:58:30 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Nicholas Shahan 134c5c32dc [ddc] Fix break on --no-nnbd build
Avoid trying to copy sound null safety sdk outline .dill when building
the legacy SDK.

Change-Id: Ib0a15e7812686bb048805ce9b11abb62031b3567
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149481
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-05-29 19:05:44 +00:00
Konstantin Shcheglov 1b6201bfe5 Update build_sdk_summaries to 'build' command, update help.
Change-Id: I8aac5209fc0c7c481c9bf5ffb93faef183532572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-29 18:22:04 +00:00