Commit Graph

26 Commits

Author SHA1 Message Date
Ryan Macnak 53f7bb175e Revert "Make --sync-async the default for the VM."
This reverts commit 1ddf553eb6.

Reason for revert: Failing service tests

Original change's description:
> Make --sync-async the default for the VM.
> 
> Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
> Reviewed-on: https://dart-review.googlesource.com/57580
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,floitsch@google.com

Change-Id: I062cb40badf0d1cf1808bee152fdd4074b00179d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/58380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-04 21:04:20 +00:00
Florian Loitsch 1ddf553eb6 Make --sync-async the default for the VM.
Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
Reviewed-on: https://dart-review.googlesource.com/57580
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-04 18:05:20 +00:00
Alexander Aprelev 5cc3736644 [vm/frontend-server] Include errors count into compile expression response.
Change-Id: Ifc42ff221eb5a0d95f7ed0f29f410ab18740b0e6
Reviewed-on: https://dart-review.googlesource.com/56140
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-24 18:16:16 +00:00
Sigmund Cherem 8c0f5747a0 Add build_integration package and move multi_root_file_system there.
This is following the design discussion we had a few months ago.

Change-Id: I48b2e82af33d10b9cd1e599e1b3a4e8e419417c8
Reviewed-on: https://dart-review.googlesource.com/56035
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-22 20:09:24 +00:00
Alexander Aprelev 80b48195b1 [frontend-server] Serialize compiled expression procedure into the file.
Improve comments and test, report errors.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/49040.

Change-Id: Ie02dae1c0edfcb54e3cd7333641e2c5eface1412
Reviewed-on: https://dart-review.googlesource.com/56030
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-21 23:50:22 +00:00
Alexander Aprelev d5b99860e4 [frontend-server] Introduce compile-expression command.
Change-Id: I5b200ab00076710b08527ec4b35322a6a5fcc4b9
Reviewed-on: https://dart-review.googlesource.com/49040
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-05-21 18:11:09 +00:00
Jens Johansen e491bc5d86 Allow to specify what dill file to initialize from
This CL updates the frontend_server to allow specifying what dill
file to initialize from.

Normally, it tries to initialize from the same dill file as is the
output. This is fine in many cases (e.g. flutter run always says it
should output to build/app.dill): The first time it compiles
everything, subsequent times (across restarts) it only recompiles
what's needed.

When running tests, however, the output is in a temporary directory,
so it doesn't work across restarts. The startup time for tests is
always rather high, because it always has to recompile everything.

This CL updates the frontend_server to allow specifying what dill
file to initialize from. Flutter can thus save the compiled test
file in a centralized location (e.g. build/test.dill) and load from
that across restarts.

Plumbing this into flutter yields the following result, when running
a single test (the one automatically created when creating a new
flutter project):

Before: ~5.5 seconds
Now, first run: ~5.5 second (unchanged)
Now, subsequent runs: ~3.4 seconds

Approximate breakdown:

Startup cost (e.g. if there's no test directory):        ~ 800 ms
Starting up the actual frontend server: ~150 ms
Reading source from old dill, loading all relevant files
and invalidating source:                                 ~ 300 ms
Compiling everything (or, rather, nothing as it's all
from the dill at this point):                            ~ 650 ms
Serializing:                                             ~ 250 ms
Copying files:                                           ~  50 ms
Running the actual test:                                 ~1100 ms

Total:                                                   ~3300 ms

`time flutter test --local-engine=host_debug --preview-dart-2`
says ~3.4 seconds...

To compare, --no-preview-dart-2 takes ~2.2 seconds,
so dart2 still has a (significantly) higher startup cost.

Moves the needle on https://github.com/flutter/flutter/issues/15767.

Change-Id: I36a2d05bc76e0193d369df42eb3b9f08416dd78f
Reviewed-on: https://dart-review.googlesource.com/51820
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-05-17 06:49:41 +00:00
Jens Johansen 94a6a48edd Don't encode strings up front; don't toString uris
Second try. First try was reverted because a previously empty URL (the
default 'always there' one) is now a null url instead, which wasn't
handled properly in the frontend_server.

See 47e9039512 for original details.

This reverts commit 4c9b712052.

Change-Id: I717eb927cbe29b6388e72f7e270428d234d44e4d
Reviewed-on: https://dart-review.googlesource.com/53580
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-14 11:31:58 +00:00
Alexander Markov 3ca5d165af [frontend server] Add an option to generate delta kernel file
This change adds experimental option '--import-dill' to front-end server
to specify existing kernel file to import when compiling a new one.
Newly generated kernel file will depend on the imported one and will
omit libraries available in the imported dill file, as well as platform
libraries.

Caveat: the new option is not compatible with '--incremental'.
Change-Id: Id637908afdb12f1829e5f634251fa9ad82676baf
Reviewed-on: https://dart-review.googlesource.com/54309
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-05-11 17:18:26 +00:00
Alexander Aprelev dcf4886500 [frontend-server] Add verbose option.
Change-Id: I49e2e4a70b91262765509504e4da303459f29fba
Reviewed-on: https://dart-review.googlesource.com/53170
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-01 16:43:14 +00:00
Alexander Aprelev f76dad0adc [frontend-server] Report error count on compile and recompile.
This allows frontend-server users(flutter) to do quick check whether frontend compilation reported errors as it produced output kernel file.

Change-Id: I6e4da8fac33104968eb7720200a1b7153ec8f3de
Reviewed-on: https://dart-review.googlesource.com/51000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-04-12 16:54:19 +00:00
asiva 25702d355e [VM / frontend-server] Add ability to pass the 'sync-async' flag into the front end server so that 'flutter tools' can choose to turn
it off or on.

Change-Id: Idf9bdbd3c30d5f0ccae89eccfa414931484199c2
Reviewed-on: https://dart-review.googlesource.com/50880
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-04-12 01:15:01 +00:00
Aske Simon Christensen 20ea3f5d69 Pass a list of context messages in onProblem callback.
Change-Id: I518e229eba261a999f43ab7ccd8cb3cfc8aae7b1
Reviewed-on: https://dart-review.googlesource.com/44541
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-05 13:29:16 +00:00
Aske Simon Christensen 83ef97f873 Wrap a formatted message with line and column in a FormattedMessage.
Change-Id: I9df1bc7ee839d6310e3670d99e813fe969fe1cb4
Reviewed-on: https://dart-review.googlesource.com/44430
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-05 13:29:16 +00:00
Jens Johansen 38fae026b4 Allow to output full component via computeDelta
This is the second attempt at this change.
The original try was committed as f9c7a4a22d.
The revert of that was committed as 2f68e82526.

This CL allows users of the incremental compiler to ask for a computeDelta
call to include the full Component in the output,
basically turning the incremental compiler into a batch compiler.

This CL furthermore changes the frontend_server (in pkg/vm) to use this
functionality.

This change - used in flutter - takes the time it takes to run
`flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
~2 minutes 30 seconds (on my machine).

Fixes #32663.

Change-Id: I073e77b3596b33a24cabcfbcedf97bb0be7aa450
Reviewed-on: https://dart-review.googlesource.com/49125
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-03 12:59:48 +00:00
Alexander Aprelev 4da52281aa [frontend-server] Return non-zero exit code if there are errors.
Change-Id: I2a1c28b391fae1cb2f7dd20b9302c70fa2fbd44e
Reviewed-on: https://dart-review.googlesource.com/48684
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-29 02:45:39 +00:00
Siva Annamalai 2f68e82526 Revert "Allow to output full component via computeDelta"
This reverts commit f9c7a4a22d.

Reason for revert: This CL breaks the restart functionality in Flutter, when we restart we end up with an empty app.dill file (60 bytes).

Original change's description:
> Allow to output full component via computeDelta
> 
> This CL allows users of the incremental compiler to ask for a computeDelta
> call to include the full Component in the output,
> basically turning the incremental compiler into a batch compiler.
> 
> This CL furthermore changes the frontend_server (in pkg/vm) to use this
> functionality.
> 
> This change - used in flutter - takes the time it takes to run
> `flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
> ~2 minutes 30 seconds (on my machine).
> 
> Change-Id: Ia185d28da1f97b0be5dad8814cd01a8f13482724
> Reviewed-on: https://dart-review.googlesource.com/47020
> Commit-Queue: Jens Johansen <jensj@google.com>
> Reviewed-by: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=ahe@google.com,vegorov@google.com,jensj@google.com

Change-Id: I5ff39f9d78319413f4bbb7800e24bf27ab4ada9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/48240
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-03-23 21:20:30 +00:00
Jens Johansen f9c7a4a22d Allow to output full component via computeDelta
This CL allows users of the incremental compiler to ask for a computeDelta
call to include the full Component in the output,
basically turning the incremental compiler into a batch compiler.

This CL furthermore changes the frontend_server (in pkg/vm) to use this
functionality.

This change - used in flutter - takes the time it takes to run
`flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
~2 minutes 30 seconds (on my machine).

Change-Id: Ia185d28da1f97b0be5dad8814cd01a8f13482724
Reviewed-on: https://dart-review.googlesource.com/47020
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-23 12:07:56 +00:00
Peter von der Ahé 4f2bdff90b Rename Program to Component
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-15 12:22:23 +00:00
Kevin Millikin 1abf929476 Fix some uses of deprecated API
Fix all deprecation warnings in the kernel and vm packages.

Change-Id: I44e5b128cc8fbc1360ad4c49ecdf2aa7cfd269d8
Reviewed-on: https://dart-review.googlesource.com/46720
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-03-15 10:09:23 +00:00
Alexander Aprelev 7328726088 Revert "Revert "Add MultiRootFileSystem options to frontend server.""
Fix check that the option was actuall specified.

This reverts commit 91c3b2c66e.

Change-Id: I0dd3e07dc7d170a8fe66e5f861aa801f4093d9e6
Reviewed-on: https://dart-review.googlesource.com/46566
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-03-15 04:25:23 +00:00
Alexander Aprelev 91c3b2c66e Revert "Add MultiRootFileSystem options to frontend server."
This reverts commit 6b0cfd42cd as it
breaks windows buildbot.

Change-Id: Iafdd4b008cef8f9787ec736e3dd89cee201886e4
Reviewed-on: https://dart-review.googlesource.com/46565
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-03-15 03:03:33 +00:00
Alexander Aprelev 6b0cfd42cd Add MultiRootFileSystem options to frontend server.
Change-Id: I2ac0d172ba730815db9ea5e17c72abe8d7faeea8
Reviewed-on: https://dart-review.googlesource.com/46620
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-15 00:41:23 +00:00
Alexander Aprelev a4c69b7729 Pass platform sdk as uri to frontend server.
This fixes frontend_server.dart.snapshot creation on Windows.

Change-Id: I8dca91ed37ad7c83e951b6fa6c7a34070a35b666
Reviewed-on: https://dart-review.googlesource.com/45060
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-05 17:52:00 +00:00
Alexander Aprelev 4ff939d3e4 [frontend-server] Keep output kernel file name through reload request.
Incremental reload request can switch to new main source. Until this CL, it caused reset of current incremental kernel file name back to full kernel file name, which resulted in full kernel file having incremental kernel contents.

BUG=dartbug.com/32384

Change-Id: Ie5037f7d6316fa262065f9ca6485879d7ee15b28
Reviewed-on: https://dart-review.googlesource.com/44901
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-05 09:14:31 +00:00
Alexander Aprelev ee15c8eb68 Move frontend_server from flutter to dart sdk.
Change-Id: I7f8b36977b448f08caf58b88b3fda43fab364514
Reviewed-on: https://dart-review.googlesource.com/43888
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-01 22:39:39 +00:00