1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 17:30:16 +00:00
Commit Graph

135 Commits

Author SHA1 Message Date
Devon Carew
ca205612d6 [deps] remove the dep on package:charcode
Change-Id: I0880f16db5bf62e6e7c91352c2f8e57f66ad7022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247500
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-06-08 19:49:22 +00:00
Aske Simon Christensen
6c7604291c [dart2wasm] Build platform dill and compile dart2wasm to AOT snapshots
This adds a --platform= option to dart2wasm to read the SDK libraries
from that dill file instead of compiling them from source every time.
If the option is not given, the SDK libraries are compiled, like before.

Also adds a "dart2wasm" build target, which will build the dart2wasm
platform dill and compile dart2wasm to two AOT snapshots (with and
without asserts). The dart2wasm scripts in sdk/bin are updated to run
via these snapshots and use this platform dill.

This speeds up test runs for the dart2wasm-hostasserts-linux-x64-d8
configuration by approximately 45x.

Change-Id: If2c7750a6eb39725310745f887792784d0dfc583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243624
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-10 10:06:06 +00:00
Zachary Anderson
2347481619 Make dart_target_arch filters for 32-bit intel consistent
dart_target_arch can be "x86", which is handled here:
https://github.com/dart-lang/sdk/blob/main/runtime/BUILD.gn#L113.
This CL also handles it in the remaining places.

This came up in https://github.com/flutter/engine/pull/30417

TEST=N/A
Change-Id: Ib6dcd0a7236938026a0cbcb3955433960b396667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237120
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2022-03-15 01:52:21 +00:00
Chris Evans
23b1f38981 Fixes for reland for analyze_snapshot program
1. Disable copying of executable for SDK binary signing
2. Fixes for ASAN memory leak in executable

TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart

This is a reland of 5d7d8a377d

Original change's description:
> Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection""
>
> This is a reland of 8d1eedca64
>
> Disable builds for Fuchsia
>
> TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart
> Original change's description:
> > Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
> >
> > This is a reland of 19e5749308
> >
> > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> >
> > Original change's description:
> > > [vm] Add analyze_snapshot tool for AOT snapshot inspection
> > >
> > > Current skeleton to allow for instrumentation snapshots that can be
> > > built alongside Dart compilation artifacts and easily referenced for
> > > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
> > >
> > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> > >
> > > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> > > Reviewed-by: Slava Egorov <vegorov@google.com>
> > > Commit-Queue: Slava Egorov <vegorov@google.com>
> >
> > Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Commit-Queue: Slava Egorov <vegorov@google.com>
>
> Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Chris Evans <cmevans@google.com>

Change-Id: I1e6e57dda56f1710cc3a52e35d4067910930a701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234500
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Chris Evans <cmevans@google.com>
Commit-Queue: Chris Evans <cmevans@google.com>
2022-03-09 14:17:44 +00:00
Alexander Thomas
0c0cd6341d Revert "Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"""
This reverts commit 5d7d8a377d.

Reason for revert: this CL unintentionally included analyze_snapshot in the Dart SDK distribution which is a release blocker.

Original change's description:
> Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection""
>
> This is a reland of 8d1eedca64
>
> Disable builds for Fuchsia
>
> TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart
> Original change's description:
> > Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
> >
> > This is a reland of 19e5749308
> >
> > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> >
> > Original change's description:
> > > [vm] Add analyze_snapshot tool for AOT snapshot inspection
> > >
> > > Current skeleton to allow for instrumentation snapshots that can be
> > > built alongside Dart compilation artifacts and easily referenced for
> > > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
> > >
> > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> > >
> > > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> > > Reviewed-by: Slava Egorov <vegorov@google.com>
> > > Commit-Queue: Slava Egorov <vegorov@google.com>
> >
> > Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Commit-Queue: Slava Egorov <vegorov@google.com>
>
> Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Chris Evans <cmevans@google.com>

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

Change-Id: Ie5b0b6d2f8f792a3bed9134d7d10fb4d34d9a58d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234284
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-02-24 16:56:23 +00:00
Chris Evans
5d7d8a377d Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection""
This is a reland of 8d1eedca64

Disable builds for Fuchsia

TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart
Original change's description:
> Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
>
> This is a reland of 19e5749308
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Original change's description:
> > [vm] Add analyze_snapshot tool for AOT snapshot inspection
> >
> > Current skeleton to allow for instrumentation snapshots that can be
> > built alongside Dart compilation artifacts and easily referenced for
> > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
> >
> > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> >
> > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Commit-Queue: Slava Egorov <vegorov@google.com>
>
> Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Chris Evans <cmevans@google.com>
2022-02-23 12:04:32 +00:00
Liam Appelbe
3a3738c6fb Revert "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection""
This reverts commit 8d1eedca64.

Reason for revert: Broke the Fuchsia bot: https://github.com/dart-lang/sdk/issues/47950#issuecomment-1040648129

Original change's description:
> Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
>
> This is a reland of 19e5749308
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Original change's description:
> > [vm] Add analyze_snapshot tool for AOT snapshot inspection
> >
> > Current skeleton to allow for instrumentation snapshots that can be
> > built alongside Dart compilation artifacts and easily referenced for
> > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
> >
> > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> >
> > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Commit-Queue: Slava Egorov <vegorov@google.com>
>
> Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

TBR=vegorov@google.com,cmevans@google.com

Change-Id: I1aa0404fa8af9bd31a5c1efbbe7f60d9da2b5b9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233160
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-02-15 18:45:39 +00:00
Chris Evans
8d1eedca64 Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
This is a reland of 19e5749308

TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart

Original change's description:
> [vm] Add analyze_snapshot tool for AOT snapshot inspection
>
> Current skeleton to allow for instrumentation snapshots that can be
> built alongside Dart compilation artifacts and easily referenced for
> specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-02-15 10:50:10 +00:00
Ben Konyi
3657251778 Revert "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
This reverts commit 19e5749308.

Reason for revert: Multiple configurations failing (https://github.com/dart-lang/sdk/issues/47950)

Original change's description:
> [vm] Add analyze_snapshot tool for AOT snapshot inspection
>
> Current skeleton to allow for instrumentation snapshots that can be
> built alongside Dart compilation artifacts and easily referenced for
> specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

TBR=vegorov@google.com,cmevans@google.com

Change-Id: Iaaeeeba04ac3283d2df3db8155389db2b358b60a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224601
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-16 18:32:20 +00:00
Chris Evans
19e5749308 [vm] Add analyze_snapshot tool for AOT snapshot inspection
Current skeleton to allow for instrumentation snapshots that can be
built alongside Dart compilation artifacts and easily referenced for
specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine

TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart

Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-12-16 15:21:14 +00:00
Ryan Macnak
b4b7b8f116 [build] Add support for building for Fuchsia from Mac.
TEST=./tools/build.py --os=fuchsia --mode=all runtime create_sdk
Change-Id: I6b15d1cc174b84d900d526730e5f58d64d2596cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-10-13 21:14:56 +00:00
Robert Nystrom
b927288ed1 Remove "dartfmt" entrypoint from the SDK.
Change-Id: I32a9f95d7b22d3311767ba22c350f197592abcab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215300
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-10-04 18:40:57 +00:00
Vyacheslav Egorov
bda70c8489 [vm] Remove support for dart-ext: imports
Per breaking change #45451 we are removing support for dart-ext:
style native extensions from the Dart VM.

This CL removes the associated VM code, tests and samples. It also ports
a single test which used dart-ext: import to use FFI instead.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: Iae984bce32baf29a950b5de1323939006a217b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212050
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 14:14:35 +00:00
William Hesse
8776e15f60 [build] Remove runtime_kernel target from GN build
Remove the runtime_kernel target and all uses of it in scripts or
the test matrix.  This runtime_kernel target is only an alias for
the runtime target, now that kernel is the default.

BUG=https://github.com/dart-lang/sdk/issues/46892

Change-Id: I00c0ecf8adbd7bff3fd3df48023a2976c5172066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2021-08-13 10:09:41 +00:00
Zach Anderson
5dc1f8db8c Trim abstract unix socket path length
Fixes https://github.com/dart-lang/sdk/issues/46149

TEST=unix_socket_test
Change-Id: Icc5273941f880f581cc2621431b5cecb7782c71e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201441
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-27 21:50:24 +00:00
Alexander Thomas
f38081d1ff [sdk] Add analysis_server.dart.snapshot to ARM SDKs.
Fixes https://github.com/dart-lang/sdk/issues/41845.

Change-Id: Ib1558472dfef0d4c815e5ba870d087fdf18f6862
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191922
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-03-19 12:03:48 +00:00
Vyacheslav Egorov
fa12114202 [vm] Remove traces of LLVM backend
The code has been dead for quite some time.

TEST=ci

Change-Id: Iddcb63e14e9e4d95230f006ac05da64f444f0712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190024
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-03-09 20:37:20 +00:00
Daco Harkes
550d580d5e [vm/ffi] Fuchsia FFI testing package
This does not include enabling the FFI on Fuchsia. So these tests will
fail without the dependent CL.

This CL adds an `all_positive.dart` test file to be packaged in the
.far file, such that it is easier to run all FFI tests in one go.

We don't run tests on the bots, but we do build this test package on
the bots.

To build the .far files locally:
```
tools/build.py --os=fuchsia -m debug fuchsia_ffi_test_package
tools/build.py --os=fuchsia -m debug -a arm64 fuchsia_ffi_test_package
```

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

Change-Id: Iec418e0c10d77afbf811fb83151664bcc2710b99
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175484
Reviewed-by: Liam Appelbe <liama@google.com>
2020-12-10 12:15:17 +00:00
Daco Harkes
9f96aeda6f [test/ffi] Add C++ unit tests for all target ABIs
This CL introduces unit tests for the Native* classes in compiler/ffi
that can run for all supported target ABIs on any host architecture.

The unit tests are compiled for all target ABIs with
`tools/build.py run_ffi_unit_tests` and run for all target ABIs with
`tools/test.py ffi_unit`.

The unit test and tested code do not conceptually depend on having a
DartVM. The tests are compiled with a custom `dart::Zone` and
`platform/`. This enables compiling for all `TARGET_ARCH_*` and
`TARGET_OS_*` on any host, and running unit tests for all target ABIs
on any host.

Because the `run_ffi_unit_tests` executables do not include the DartVM
their build is quick (<10seconds) and they are small (~6MB) when
compared to `run_vm_tests` (~250MB).

The tests are added to the existing FFI QEMU bot to prevent adding an
extra bot which would add checkout overhead.

The unit tests themselves are set up to be fairly similar to vm/cc
tests. The only difference is the NativeCallingConvention tests which
are set up with `.expect` files for easy inspection and updating.

TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=runtime/vm/compiler/ffi/native_location_test.cc
TEST=runtime/vm/compiler/ffi/native_type_test.cc

Change-Id: I7b8bf4de9ef070e7546472217e571a60362b9639
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171725
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-16 16:10:55 +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
Liam Appelbe
6bd220f556 Reland "[vm] Fix some Fuchsia tests"
This reverts commit 17faf89d02.

The fix is in eventhandler_fuchsia.cc. Rather than changing the
condition on line 401, I've just weakened the assert.

Change-Id: Ia6b1f35e479e4b2fdf1adc77e9513551221a7696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157564
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 21:29:29 +00:00
Liam Appelbe
17faf89d02 Revert "[vm] Fix some Fuchsia tests"
This reverts commit 3ec7ea15ec.

Reason for revert: Causes timeouts in some Flutter Fuchsia tests

Original change's description:
> [vm] Fix some Fuchsia tests
> 
> Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

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

Change-Id: I156eee7eb424fcfbc5bbf1b4a11d3d9eeab920a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157441
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-05 23:46:56 +00:00
Liam Appelbe
3ec7ea15ec [vm] Fix some Fuchsia tests
Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-03 22:24:28 +00:00
Liam Appelbe
f66eb7228a [test] Infra for running tests on Fuchsia emulator
The IO tests aren't working yet, but basic tests work:
tools/test.py -n dartk-fuchsia-debug-x64 language_2/list/literal3_test

You may need to run this first:
sudo chmod 666 /dev/kvm

Change-Id: I04915ce11f671f1d493f9eeb6bc832089ba9bfa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154828
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-21 19:40:15 +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
Liam Appelbe
6fc75e6a2b [vm] Add tests and packages to the Fuchsia package
Also, delete some unnecessary files from build/fuchsia, and add an async
dispatcher to os_fuchsia.

Change-Id: I477e58d54330e83b2c7b6463395a1212707f8ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154162
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-07-15 20:44:06 +00:00
Liam Appelbe
089d6fc016 [vm] Build a runnable Fuchsia package containing Dart
Everything in the build/fuchsia director (except for tests.cmx) was
copied and modified from:
https://fuchsia.googlesource.com/samples/+/refs/heads/master/build

This doesn't include any tests yet, but its runnable on the emulator.

Change-Id: Id64ae71062447c789ca4d10ed3a4a09e0a6d7b99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152589
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-07-10 18:10:05 +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
Ben Konyi
1960d21144 [ VM / DartDev ] Updated build rules for DartDev and exposed create_platform_sdk build target
- DartDev will now be rebuilt when changes in DDS are made
- Building the `create_platform_sdk` target will build all non-web
components of the Dart SDK, allowing for shorter build times when not
developing web tooling.

Change-Id: I605df4893e93010ba0c0bab0593fb840f1859c07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147807
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-12 23:37:19 +00:00
asiva
03ce33f80c [BUILD] - Initial CL to unfork the NNBD Dart SDK
- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I729630a7bd36ea7ae38134f9285b44e93c283c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138902
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-07 21:12:47 +00:00
Ben Konyi
48aa020a7c [ DartDev ] Generate dartdev snapshot for runtime build target
Change-Id: I39b0a5326e502121ffab1dbeef92d1d9fee5ef8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146689
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-05 22:27:09 +00:00
Ben Konyi
a305eb6969 [ dartdev ] Disable dartdev snapshot generation for runtime build
Change-Id: Ib0b9917543e2d9d82431b78a9d372ba2cf2ed10e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146687
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-05-05 21:52:02 +00:00
Ben Konyi
918eae3e5e Reland "[ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev"
This reverts commit 798b6e7c8d.

Change-Id: I5af5eb126d83d8f67b18d5159ead0a276665034e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146661
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 18:48:58 +00:00
Ben Konyi
798b6e7c8d Revert "[ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev"
This reverts commit ffbd84d383.

Reason for revert: Failing build on golem and failing test on simarm bot. Will investigate tomorrow.

Original change's description:
> [ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev
> 
> Dartdev will now spawn a DDS instance when the --observe flag is
> provided. The stdio streams from the target process are filtered to
> replace any references to the true VM service URI with the DDS URI.
> 
> If arguments are provided to --observe to configure the server, the
> arguments will be used when spawning DDS instead of the VM service.
> 
> Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I750325b45692ff7a40066b37924b01fa98a692d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146522
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 02:17:36 +00:00
Ben Konyi
ffbd84d383 [ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev
Dartdev will now spawn a DDS instance when the --observe flag is
provided. The stdio streams from the target process are filtered to
replace any references to the true VM service URI with the DDS URI.

If arguments are provided to --observe to configure the server, the
arguments will be used when spawning DDS instead of the VM service.

Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-05 01:18:28 +00:00
Siva Annamalai
726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva
cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Ben Konyi
60823bdaf6 Revert "[ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory"
This reverts commit 367ee916d6.

Reason for revert: Build failures

Original change's description:
> [ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory
> 
> VM developers rarely run the create_sdk build as it's significantly
> slower than just building the VM. Since DartDev is coupled to the VM, we
> should build it to ensure that there's no snapshot errors due to old
> snapshots from previous create_sdk builds.
> 
> Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
> Reviewed-by: Jaime Wren <jwren@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I36754f7830e637313a390218d16869a8528f75ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-23 17:28:20 +00:00
Ben Konyi
367ee916d6 [ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory
VM developers rarely run the create_sdk build as it's significantly
slower than just building the VM. Since DartDev is coupled to the VM, we
should build it to ensure that there's no snapshot errors due to old
snapshots from previous create_sdk builds.

Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-23 16:47:09 +00:00
Siva Annamalai
63a92a3b00 Revert "This is a trial submit of the unfork CL, it will be reverted immediately."
This reverts commit 393468dc89.

Reason for revert: This was a trial submit and so reverting it.

Original change's description:
> This is a trial submit of the unfork CL, it will be reverted immediately.
> This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.
> 
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I7b50fae71764eceb17893338d1981e40ea2de520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-20 03:50:49 +00:00
asiva
393468dc89 This is a trial submit of the unfork CL, it will be reverted immediately.
This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.

[BUILD] - Initial CL to unfork the NNBD Dart SDK

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-20 03:46:06 +00:00
asiva
e33d023fa0 [BUILD] - Format gn files, this is being done to ensure the unfork CL
doesn't show these formatting changes as diffs.

Change-Id: I69ccbf4adabc66d88371cece785a2c1bce60f133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138962
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-03-10 21:56:11 +00:00
Keerti Parthasarathy
6d468d1377 Add a script and target to run dartfix
Change-Id: I68df635359b898ef4b6054292f6523d81f46448a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121149
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-10-14 15:50:21 +00:00
Nicholas Shahan
50d972bba0 Build DDC targets with forked SDK sources when building with --nnbd flag
Issue: #38665

Change-Id: I42eb4e97f3269f7d1a53abeac62f9293a003ae60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120400
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-10-09 23:24:21 +00:00
Teagan Strickland
785ae930d3 [gardening] Fix NNDB flag use for Flutter HHH build.
Our //build/config/BUILDCONFIG.gn isn't used for Flutter, so we must
put the default version where the Flutter build can see it.

Change-Id: I99afc99209b3721c48aa56ef413910d34df1bb8c
Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120580
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2019-10-07 09:47:02 +00:00
Robert Nystrom
8e2649b357 Revert https://dart-review.googlesource.com/c/sdk/+/117681.
Built the revert CL by hand because it conflicts with other changes.

Change-Id: I50fed06e9b5311d38b0f242f8207d5c51c795783
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120360
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-04 22:46:52 +00:00