Commit graph

1386 commits

Author SHA1 Message Date
asiva f29d9f4fb1 [VM/Libraries] Use the NNBD libraries when building the NNBD sdk.
Change-Id: I06507799f678eeb204fdc8719ef6d97b177cbfd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134112
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-07 00:00:07 +00:00
asiva ac27627dd7 Do not opt-in to NNBD when building application snapshots for kernel service and other tools like dartjs, dart analyzer etc. We should enable this only when all the tools are ready to opt-in.
Change-Id: If7f507d101d006a9e103118c9f989dc9f1b145d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133481
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-01-28 19:33:00 +00:00
Konstantin Shcheglov b663ef5cc4 Build non-nullable or legacy SDK summary.
Bug: https://github.com/dart-lang/sdk/issues/38666
Change-Id: I24f6f36b5ed1dbef64588dd787aaf2abbd62f53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-22 18:02:08 +00:00
Jacob MacDonald 4460f95782 Updates frontend_server javascript bundler to be based on import uri instead of file uri.
Converts `package:` import uris into `/packages/` modules.

Also renames the output modules to append `.lib.js` instead of just `.js`. This allows us to distinguish between modules and applications based on extension.

Updates DDC source map code to be able to convert absolute file uris in sources so that they are relative to the source map.

Bug: https://github.com/dart-lang/webdev/issues/865
Change-Id: I55d70aa3761f10cc8bd7e92f5b567478040660de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132300
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-01-21 17:41:02 +00:00
Sigmund Cherem f910a7575f dart2js nnbd setup
- fixes check_nnbd_sdk.dart to run on dart2js patch files
- splits golden file used by that script by target
- adds it to the old-rti bot (until we get the new nnbd bot)
- adds a suite that runs legacy tests in nnbd weak mode

Change-Id: I0a89534dcd1cf7338849d59ab3e5d989d2ecf3d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131885
Reviewed-by: Vijay Menon <vsm@google.com>
2020-01-21 06:22:51 +00:00
Martin Kustermann c0ca187f26 Revert "Create the frontend_server snapshot as a part of the sdk"
This reverts commit 24a0601d5b.

Reason for revert: This breaks the flutter build because flutter has
a build target producing the same "gen/frontend_server.dart.snapshot" file and is therefore conflicting.

See e.g. head-head-head bot failure:

    https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/9747


Original change's description:
> Create the frontend_server snapshot as a part of the sdk
> 
> This will allow us to use it from webdev, as it now supports DDC output.
> 
> Change-Id: I4b82d1c45d2c058abb062dddd2a2c41cc6318c45
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130134
> Reviewed-by: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Jonah Williams <jonahwilliams@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>

TBR=keertip@google.com,jakemac@google.com,vsm@google.com,jonahwilliams@google.com

Change-Id: Ib2d782560cc005416ece429f9506dca055bffd9b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130377
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-01-07 15:10:23 +00:00
Jacob MacDonald 24a0601d5b Create the frontend_server snapshot as a part of the sdk
This will allow us to use it from webdev, as it now supports DDC output.

Change-Id: I4b82d1c45d2c058abb062dddd2a2c41cc6318c45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130134
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-01-06 22:05:19 +00:00
asiva 122e9424b8 [SDK/BUILD] Pass --enable-experiment=non-nullable to the gen_kernel when it is used to compile the sdk tools.
Change-Id: Ie43018e55a4fb5e571a0753b31ab7561d26482bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128378
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2019-12-14 01:04:45 +00:00
Sigmund Cherem 35bc105c45 Whitelist all packages in the .packages file as opt-out from nnbd.
Change-Id: Ic52130d4853a32664ab0fe9db32be12e55d763db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-12-13 21:19:54 +00:00
Liam Appelbe 3166b7d976 [vm] Enable nnbd experiment when building the SDK with --nnbd
This is necessary as of https://dart-review.googlesource.com/c/sdk/+/127961
to use the experiment flag in the VM.

Tested: Late modifier tests that had stopped building now pass again.

Change-Id: I49a5f1e99f40c6e8d785b28a333b44e6fac67eca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127984
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-12-13 20:13:20 +00:00
Sigmund Cherem 679b005946 fix nnbd bots: build step broke when tests were moved
TBR=rnystrom@google.com

Change-Id: I241cfcccdeb5abfdb3ee07977d8ca211069f985f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128103
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-12-11 21:29:58 +00:00
Nicholas Shahan 7974f3f899 [dartdevc] Reduce the number of SDK libraries in the platform
We are temporarily building a smaller SDK platform to make progress building
applications against the forked sdk_nnbd sources. This is because some of the
libraries have not yet been ported and they don't compose well.

I needed to thread the status of the non-nullable experiment through the front
end entry point and into the target options, and native types.

Also includes some standardization of the flag name in DDC.

https://github.com/dart-lang/sdk/issues/39698

Change-Id: I4bdd503be694b28d7f95828d4af28d1d5fb3691f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127486
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-09 22:25:48 +00:00
Nicholas Shahan 2015c55277 [dartdevc] Remove ability to run analyzer based DDC
This is the first step in deleting legacy DDC!
* Default all invocations of DDC to run the kernel version.
* Disable all tests that run analyzer DDC.
* Detect the most likely case when invoked with an analyzer
  summary and print instruction to update build_web_compilers
  dependency.

I will follow up with deletions, and a rename of the test configurations/
builders to reclaim the names (ddc vs ddk, dartdevc vs dartdevk).

Issue #38777

Change-Id: I1477f0274b6b7f345a5e19d2b3f93797c454a09e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127067
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-12-09 22:11:22 +00:00
Sigmund Cherem 42ec44a6a4 Reland "Revamp patch_sdk.dart mainly to use libraries.json."
This is a reland of 3c9e924073

Original change's description:
> Revamp patch_sdk.dart mainly to use libraries.json.
> 
> This will make it possible to use the script to create a patched sdk
> for dart2js and the vm (some followup needed), which will be useful
> to migrate their libraries to nnbd.
> 
> In the future, we should be able to leverage this new logic to
> write tests that ensure our sdk is warning-free (there are > 80 real
> warnings today even on the non-nnbd sdk)
> 
> In detail, this CL includes:
> 
> * loading the libraries data from libraries.json, this removes the need for a
>    hand-crafted libraries.dart that replicates the data in libraries.json.
> 
> * auto-generates a libraries.dart in the patched sdk that can be used to run
>  dartanalyzer or to compile an sdk with dartdevc-legacy.
> 
> * script simplifications in patch_sdk.dart
>     * removed tracking of modification stamps. This didn't appeared to be
>       used by the ninja rules. I believe it was used to reduce local
>       iteration cycles when we were first developing the sdk itself.
> 
>     * use Uri directly instead of package:path - this simplifies things,
>       especially since the libraries_specification is Uri-based as well.
> 
>     * switch to use package:args for parsing options
> 
>  * added an option to merge part files in a single file. I've noticed that the
>  analyzer provides some false positive errors in part files, but once merged
>  they are no longer shown. In particular, we are clearly hitting limitations of
>  dartanalyzer on the patched sdk. At this time the old patch-script generated
>  an sdk with 1500 warnings, this new script reduces it to 500 (not sure why),
>  with merging of part files it goes down to 80.
> 
> 
> Change-Id: I6bbaf92ef4554f00c8bf6b38d19bf79d44fb3e94
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125780
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Sigmund Cherem <sigmund@google.com>

Change-Id: Ifcb9dbef36452e41e8e96e086761d76b5a3d988e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125998
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
2019-11-26 01:40:53 +00:00
Sigmund Cherem 603fd7881f (ddc) Fix deps tracking for the ddc sdk.
The compile_platform template assumes that the output will be in the root-out-dir, and because of that the generated .deps file contains relative paths that only work if the output is in that folder.

It would be nice to fix compile_platform to be more flexible about this, but for now moving the output up fixes the issue that modifications in the sdk were not triggering a rebuild.

Change-Id: Ifc1e7adb23d6911a9f71c341b7968e0a9b1d4973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126122
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-23 00:21:58 +00:00
Vijay Menon 8295efc541 Revert "Revamp patch_sdk.dart mainly to use libraries.json."
This reverts commit 3c9e924073.

This CL was breaking the internal build.

Change-Id: Ic4e6df070f2a87ac88ef97f0e6b07d53c13ceadc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125925
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
2019-11-21 14:36:55 +00:00
Sigmund Cherem 3c9e924073 Revamp patch_sdk.dart mainly to use libraries.json.
This will make it possible to use the script to create a patched sdk
for dart2js and the vm (some followup needed), which will be useful
to migrate their libraries to nnbd.

In the future, we should be able to leverage this new logic to
write tests that ensure our sdk is warning-free (there are > 80 real
warnings today even on the non-nnbd sdk)

In detail, this CL includes:

* loading the libraries data from libraries.json, this removes the need for a
   hand-crafted libraries.dart that replicates the data in libraries.json.

* auto-generates a libraries.dart in the patched sdk that can be used to run
 dartanalyzer or to compile an sdk with dartdevc-legacy.

* script simplifications in patch_sdk.dart
    * removed tracking of modification stamps. This didn't appeared to be
      used by the ninja rules. I believe it was used to reduce local
      iteration cycles when we were first developing the sdk itself.

    * use Uri directly instead of package:path - this simplifies things,
      especially since the libraries_specification is Uri-based as well.

    * switch to use package:args for parsing options

 * added an option to merge part files in a single file. I've noticed that the
 analyzer provides some false positive errors in part files, but once merged
 they are no longer shown. In particular, we are clearly hitting limitations of
 dartanalyzer on the patched sdk. At this time the old patch-script generated
 an sdk with 1500 warnings, this new script reduces it to 500 (not sure why),
 with merging of part files it goes down to 80.


Change-Id: I6bbaf92ef4554f00c8bf6b38d19bf79d44fb3e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125780
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-20 22:51:42 +00:00
Sigmund Cherem bcc77d8605 (ddc) Generate the sdk.js files by reading a dill file directly
This is to align how we pipeline each step in the build with other tools. It
will also help with caching and incremental rebuilds when doing local development
in ddc.

Change-Id: I8ff9988927d5632301926fca173c01dd281f923f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125447
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-11-19 00:24:48 +00:00
Sigmund Cherem 19144db89f Use compile_platform to build the sdk.dill
This moves ddc to use the same logic to compile the sdk.dill as all other
backends. This will also enable us in a subsequent CL to generate the dart_sdk.js
files from a precompiled .dill file, and hence improve overall caching on local
rebuilds.


Change-Id: I02e178baa5497a5bee2de42e3423176ca97ceaef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125446
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-19 00:24:48 +00:00
Sigmund Cherem 01614788c8 (ddc) split rule that compiles packages into separate rules for each package
This allows us to compile each package in parallel (for those with no deps), and
will make it possible to enable nnbd on a subset of them (expect, async_helper,
js, meta)

Change-Id: I032bafe3e43b14340ee35509d1f228d18571f524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125484
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-18 22:59:00 +00:00
Sigmund Cherem 99f88806ec (ddc) split call to build_pkgs: create packages for dartdevc-legacy and dartdevc separately
We still have a single `dartdevc_test` rule that invokes both, but now they can
run in parallel and this unblocks a subsequent change to build each pacakge
separately under kernel.

Depending on the timing of deleting dartdevc-legacy, we may want to consider
adding a `dartdevc_legacy_test` vs `dartdevc_kernel_test` to keep the two more
separate/siloed.

Change-Id: Icc3f8fd21248aa09b553c41df708452d21b39b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125500
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-18 21:22:05 +00:00
Sigmund Cherem 557ed605de Temporarily do not enable nnbd when building packages for ddc tests
This will make the nnbd-ddc bot green again. To properly support compiling these
packages in the future, we need to either migrate them or add to the CFE the
machanism to select whether a package is opt-out.

Change-Id: Ia8c5fa1a8000e233af20c87e877e2c666cb4354e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125420
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-15 17:49:43 +00:00
Sigmund Cherem d2c63991ae Improve NNBD testing support
The goal of this change is to make it possible to start iterating on nnbd tests
for DDC. This keeps the current philosophy of keeping NNBD and non-NNBD build
configurations separate, except that NNBD builds are allowed to consume library
sources from the non-nnbd sdk.

This change addresses the first set of errors that are encountered when trying
to build a fully NNBD configuration:
  * CFE has issues with type promotion, for that reason we remove
    `--enable-experiment=non-nullable` in vm build rules, and we use a smaller
    training data when creating the dartdevc app-jit snapshot.
  * We'd hit compile-time errors with nnbd libraries with inconsistent
  patchfiles. To avoid that, the libarries.json points to the non-nnbd SDK
  sources for most dart:* libraries.

Change-Id: Ie6226b3bd8a92b4a1632dd84a5db2f04238fd4f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125080
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-11-14 18:28:20 +00:00
Jacob MacDonald 4551080062 Add retry logic for incremental compiler initialization.
Problem:

We have been having a lot of reports of failures when initializing the incremental compiler
(see https://github.com/dart-lang/sdk/issues/38102).

These appear to be the result of empty kernel files but we have added other logic to check
for that when kernel files are written, which has had zero reports of throwing from users
(https://github.com/dart-lang/build/pull/2387).

We also use the same mechanism for temp directory management as we did with analyzer, but only
see this problem with the switch to kernel, and specifically the incremental compiler.

Solution:

Add retry logic and see if that fixes the problem. Any time there is a retry log a warning
so that we don't just silently do retries all the time.

This is a general defensive mechanism to cover a broad spectrum of potential failures with the
incremental compiler in the wild. I don't intend to remove it as it isn't harmful, and the
warning logs should be enough to encourage issues to be filed if it is happening often.

I have no direct reason to believe this will actually solve the particular linked problem other
than that we only see this issue when the incremental compiler is enabled.

Bug: https://github.com/dart-lang/sdk/issues/39122, https://github.com/dart-lang/sdk/issues/38102
Change-Id: Iaabb4497d6da69684692c1d7b9c030c59ebc6072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123001
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-10-31 16:57:44 +00:00
Nicholas Shahan 5706d13c06 [dartdevc] Update URI for libraries.json to use multi-root
I confirmed that this prevents the local paths from leaking into the ddc_sdk.dill
file created by this build target.

Change-Id: I777482f5aea6d70106072f070ab48233ec302682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122178
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-10-21 20:40:28 +00:00
Robert Nystrom ed0cc81e81 Get DDC and DDK test builds working with the forked NNBD SDK.
With these changes, I can run:

  ./tools/build.py -m release --nnbd dartdevc_test

In a checkout that also includes a migrated core library that uses
NNBD features.

I haven't verified if the resulting JS is *correct*, but the build
doesn't error out.

Change-Id: I7d89efe5da8c46e2a9805743e4e61858da8097dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122280
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-21 17:19:59 +00:00
Robert Nystrom 064c3c7cf7 Get the DDK build working with NNBD.
When use_nnbd is set, make the build steps for generating the DDK SDK
summary and JS use the forked SDK directory and enable the non-nullable
experiment flag.

Change-Id: Ia483a621dccd40245cdf5e2c1f7fd86b9bc1e266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122162
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-18 22:59:21 +00:00
Jacob MacDonald 22e249d4d5 update kernel worker to support -D environment defines
Change-Id: Ic73cfcc8dc0bd8b721733e0696b028aa572125e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121927
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-10-18 14:33:08 +00:00
Devon Carew c6c79e529e [analyzer] add more inputs to the analysis server GN build
Change-Id: I421941e5051f968763c94faeedb4acf149c2afce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121883
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-16 22:43:59 +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
jonahwilliams 13fbf569f6 [flutter] split frontend_server from vm package
To support JavaScript compilation, the frontend_server will require a dependency on the dev_compiler. To avoid conflating this with the vm specific functionality, the frontend server will be split from its current location.

This change will require a small corresponding update in flutter/engine, documented in the patches directory
Change-Id: I47923765546f7f6fa43e36ef38f8f466d3a7b2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120321
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-10-08 05:32:59 +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
Mark Zhou 36e4d5e3c2 Reland "[dartdevc] cleaning up unused web files"
This is a reland of e866f043cf

Original change's description:
> [dartdevc] cleaning up unused web files
>
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
>
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I7e01fb4ad60e47808721fa49b3ca3498e7aeaf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120200
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-05 00:27:22 +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
Jens Johansen 05c75c096d [CFE] Merge DDC and bazel incremental modular entrypoint code
Change-Id: Ia6ff627d50131fb55817e0d1adf2bc15240aeec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119338
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-01 13:56:32 +00:00
Alexander Aprelev 34087a61ba [build] Remove dart_host_toolchain.
Consensus seems to be that there should be different mechanism to support host-targeting-host vs host-targeting-target configuration: comparing toolchains names won't work for that.
Also, dart_host_toolchain was set up to be used by Fuchsia, but it is no longer being used.

Change-Id: Ic2e63d8cef00b18bf6866122199027459eaf32c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118910
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-27 21:14:11 +00:00
Jens Johansen ff778d1cb4 [bazel] Sort certain things when compiling in incremental mode (take 2)
Not doing it can lead to the same input producing "different" outputs.
Note that this is a follow-up to cdcec63569
where I forgot about the incremental summary-only case.

Change-Id: Idf76c3839f46c468a62350968b353be7235d91b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118287
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-20 13:12:55 +00:00
Jens Johansen b0f7cba35e [VM] Kernel service dill should not include full paths
It is included in the 'dart' binary thus making it change depending on
where it is compiled.

Change-Id: I6f3ad8cf8f8da386ada7809402b4711c4fcab3ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117728
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 09:01:32 +00:00
Jens Johansen cdcec63569 [bazel] Sort certain things when compiling in incremental mode
Not doing it can lead to the same input producing "different" outputs.

Change-Id: I31fa1d728c2d26cbf1ad008472ea8fce4310794f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117725
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 09:01:17 +00:00
Ryan Macnak 6a27310b87 Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
Change-Id: I7878f369ccbf05551aa7c0f6546544f8adb801c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117660
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-18 02:53:44 +00:00
Alexander Aprelev b0fa0aebb7 [build] Ensure kernel service trains on the source.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/117286.

Fixes dartbug.com/38427.

Change-Id: I8e3227addf459577e5126e9c48d1cb95b170157a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117464
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-17 17:18:09 +00:00
Clement Skau b87c9afb82 Revert "Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM.""
This reverts commit 46f2603781.

Reason for revert: Broke Flutter 3H:
https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/8899

Original change's description:
> Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> 
> This reverts commit d9489622be.
> 
> Reason for revert: flutter/engine@04f567bdde
> 
> Original change's description:
> > Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> > 
> > This reverts commit 74cff6c7df as it
> > introduces a breakage of flutter build process.
> > 
> > Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."
> > 
> > This reverts commit 351acd155d as a
> > collateral damage.
> > 
> > Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
> > Commit-Queue: Alexander Aprelev <aam@google.com>
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> 
> TBR=aam@google.com,rmacnak@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: Ie27eb455eddd3e60b96eb65bb3dad888b369baf6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117286
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=aam@google.com,rmacnak@google.com

Change-Id: I519a7330efa3a84b8b0a19b5f8d5e476d6ca96cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117541
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-17 09:05:33 +00:00
Ryan Macnak 46f2603781 Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
This reverts commit d9489622be.

Reason for revert: flutter/engine@04f567bdde

Original change's description:
> Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> 
> This reverts commit 74cff6c7df as it
> introduces a breakage of flutter build process.
> 
> Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."
> 
> This reverts commit 351acd155d as a
> collateral damage.
> 
> Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
> Commit-Queue: Alexander Aprelev <aam@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=aam@google.com,rmacnak@google.com

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

Change-Id: Ie27eb455eddd3e60b96eb65bb3dad888b369baf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117286
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-16 19:36:40 +00:00
Alexander Markov 4aa820bbf5 Reland "[vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode"
This is a reland of https://dart-review.googlesource.com/c/sdk/+/113123
after stack overflow in the interpreter was fixed in https://dart-review.googlesource.com/c/sdk/+/117061

Original change's description:

Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
this flag is global and used by kernel service isolate while running tests.
Flipping this flag causes assertion failures in kernel isolate's background compiler
or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
doesn't set entry point to InterpretCall.

The less intrusive way to ensure compilation of functions in unit tests is to set
FLAG_compilation_counter_threshold to 0.

Change-Id: Ibbcf4b5bb0df558851c80cfa40a9a54f949dd187
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117122
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 16:38:17 +00:00
Jens Johansen 25401964ab Pass proper file URI under both Windows and not
Before this CL the kernel service was during the build trained with
an attempt at a full file uri for dart2js.
There was a suddle bug though: Under non-Windows the uri would become
something like "file:////full/path/to/dart2js.dart" (i.e. have 4 slashes)
whereas under Windows it would look something like
"file:///C:/full/path/to/dart2js.dart" (i.e. correctly with 3 slashes).

Mostly, having 4 slashes instead of 3 doesn't matter much:
Everything will just look weird and have 4 slashes instead of 3,
but when at the same time giving the compiler a relative .packages file
(so it will be translated according to the current directory and become
a uri with 3 slashes) with relative uris in it (so those uris also get
3 slashes in them) and then doing a sub-string match to - in some
cases - interpreting the input as a package uri things go awry.
"file:///path/to/whatever" is not a substring of
"file:////path/to/whatever" and thus the interpreting the input as a
package uri doesn't happen, which can cause weird compilation errors
when mixing relative and package uri imports, e.g.:

file:////b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/codegen.dart:439:38: Error: The argument type 'MemberEntity/*1*/' can't be assigned to the parameter type 'MemberEntity/*2*/'.
 - 'MemberEntity/*1*/' is from 'file:////b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/elements/entities.dart'.
 - 'MemberEntity/*2*/' is from 'package:compiler/src/elements/entities.dart' ('file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/elements/entities.dart').
Try changing the type of the parameter, or casting the argument to 'MemberEntity/*2*/'.
    return _functionCompiler.compile(member);
                                     ^
Change-Id: I4c6b5ea2e7e2e4a75331847138a79708ac365769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103126
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-13 14:11:32 +00:00
Alexander Aprelev d9489622be Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
This reverts commit 74cff6c7df as it
introduces a breakage of flutter build process.

Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."

This reverts commit 351acd155d as a
collateral damage.

Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-12 22:01:49 +00:00
Ryan Macnak 351acd155d [build] Fix application_snapshot.gni for uses outside of utils/xyz.
Cf. 74cff6c7df

Change-Id: I7af53019bbe4bfe3eba8fc3a4648ec70a26cbc90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117013
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-12 20:42:42 +00:00
Ryan Macnak 74cff6c7df [build] Speed up debug and simulator builds by running steps on the prebuilt VM.
Only generating a snapshot really requires running the VM produced during the build.

Change-Id: Ic07bf8b61609c39c9e2dc910737ed56e64decd43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116749
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-12 16:43:51 +00:00
Sarah Zakarias 6512f5563d Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable.""
This reverts commit 54fdd559d8.

Trying to reland this after https://dart-review.googlesource.com/c/sdk/+/115364 hopefully fixes the issue leading to the revert.

Change-Id: If3c49bea9d791aa3d569003490c1cbe8b325f2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115705
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-05 14:46:43 +00:00