* Leave only widget creation tracker kernel pass in flutter frontend server.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/43888.
* Adapt to updated interface
* Tyop
* Fix imports. Compiler interface extension
* Add trivial test back. Rename library to flutter_frontend_server.
Flutter downloads only one version of flutter_patched_sdk, which was obtained from host_debug build on Linux. Generated entry points JSON files are different in profile and release builds (as release build omits observatory), so these files should be downloaded independently of flutter_patched_sdk.
This PR moves generated entry points JSON files from flutter_patched_sdk to a separate directory (out/*/dart_entry_points) and adds an option to specify entry points to frontend_server (as Flutter tools will need to pass custom locations of entry points files outside of flutter_patched_sdk).
* Generate Flutter-specific entry points JSON file while building engine.
* Add ''--tfa' option to front-end server.
* Rename _entryPoint field in front-end server to _mainSource to avoid disambiguation.
* Fix analyzer warning.
warning • This function declares a return type of 'Future<void>', but doesn't end with a return statement at flutter/frontend_server/lib/server.dart:340:1 • missing_return
* Remove await
* Ignore warning.
* Add option for recompile request to switch to new main file(entrypoint).
This is needed to reuse incremental compiler to compile unrelated programs. First use case is reuse single
incremental compiler for all tests run by 'flutter test'
* Remove left over print
* Write artifacts produced during frontend_server training into temp folder.
* Write artifacts produced during frontend_server training into temp folder.
* Fix File/String mixup
* Remove temp directory. Use full prefix for package
* Delete in finally {}
* Let frontend_server bootstrap the incremental compiler from a previously build dill file
* Wrap 'invalidateIfBootstrapping' in try and don't bootstrap if getting an exception
* Support .packages option in frontend_server, bundle_path in main_mac.
This is needed to be able to run in mode.
* Remove byte store tests
* Remove unused import
* Fix formatting
* Enable flutter test argument passing on win and linux.
* Fix formatting
* Roll Dart to 93d8c9fe2a2c22dc95ec85866af108cfab71ad06.
* Fix analyzer nits
* Try to pin dependency for tools/licenses to convert 2.0.1. Add verbose flag to pub get
* Pin dart to dev.16 to overcome pub issue
* Revert "Try to pin dependency for tools/licenses to convert 2.0.1. Add verbose flag to pub get"
This reverts commit d525a83f4494a511996226d328a5208d4651d46e as it is no
longer needed, was added to diagnose the problem, which turned out to be
a problem with pub in latest dart dev release.
* Fix license hash
* Reintroduce api methods and tests
* Add a --strong option to the front end server so we can use strong mode with preview-dart-2.
* Plumb the --strong option through the dart controller into the VM.
* - Build a strong version of platform.dill for use with the engine.
- Fix a strong mode static error in the assert statement
* Enable asserts when running debug version even in strong mode.
* Use the correct platform dill file for linking when doing the aot builds.
* Fix formatting issue.
* Revert "Revert "Fix filename handling for Windows. (#4482)" (#4484)"
This reverts commit 929e5b3900e2aab0c0f05889fd44b3a9525e846a.
Reverting now since issue with
gen_snapshot(as described in https://github.com/flutter/flutter/issues/13708) was fixed.
* resolve->resolveUri, drop underscores
* Fix underscore
This reverts commit 1fb585810faacccf81d4aa4e5392c31e1593e031.
This change is not sufficient as it exposes problem with kernel-based
gen_snapshot on Windows and results in Flutter test failures.
* Do not use CompilerOptions.onError to report errors.
CompilerMessage does not carry correct SourceSpan
which makes errors unreadable: they all point to
line 1 column XYZ.
* Run dartfmt on frontend_server/lib/server.dart.
* Fix linting issues for frontend_server
* Use the VM-specific wrapper for the kernel front-end to support VM-specific kernel transformations.
* Also, pass a flag to distinguish AOT mode from JIT mode to enable whole-program optimizations.
* Run frontend server from temp directory to force absolute URIs in Kernel file.
* Create special directory to cwd into to avoid conflicts with app sources in temp folder
* Make variable final
* Fix problem with _filename not being set. Add tests for that(and add mockito to mock IKG).
* Initialize KernelSerializer, Fix indentation
* Style nits and reworded comment
* Introduce frontend_server that allows for interactive and batch modes.
Example of batch mode:
```
$ dart $HOME/p/f/t11/flutter/engine/src/flutter/frontend_server/bin/server.dart --sdk-root=$HOME/p/f/t11/flutter/engine/src/out/android_debug/flutter_patched_sdk --platform-kernel-dill=$HOME/p/f/t11/flutter/engine/src/out/android_debug/flutter_patched_sdk/platform.dill $HOME/p/f/t11/flutter/flutter/examples/flutter_gallery/lib/main.dart
out: result 79256789-598c-4909-a9e4-0ef36d4c26ba
out: 'State&TickerProviderStateMixin^#U0^' is exported from both 'package:flutter/src/widgets/animated_cross_fade.dart' and 'package:flutter/src/widgets/animated_list.dart'.
...
out: Superclass has no method named 'hitTest'.
out: 79256789-598c-4909-a9e4-0ef36d4c26ba $HOME/p/f/t11/flutter/flutter/examples/flutter_gallery/lib/main.dart.dill
$
```
Example of interactive mode - communication via stdin/stdout:
```
$ dart $HOME/p/f/t11/flutter/engine/src/flutter/frontend_server/bin/server.dart --sdk-root=$HOME/p/f/t11/flutter/engine/src/out/android_debug/flutter_patched_sdk --platform-kernel-dill=$HOME/p/f/t11/flutter/engine/src/out/android_debug/flutter_patched_sdk/platform.dill --incremental
out: Frontend server is ready.
in: compile abc.dart
out: result fd99c0f9-12bb-4083-818e-2521d454fdc8
out: fd99c0f9-12bb-4083-818e-2521d454fdc8 abc.dart.dill
in: accept
in: recompile kuka
in: 123.dart
in: 456.dart
in: kuka
out: result d12f8d05-6c79-44f7-a775-1d3469e1be53
in: quit
$
```
* Add test. Cleanup dependencies.
* One more test with mocks
* Remove platform-kernel option. Refactored CompilerOptions. Clean up comments.
* Update license
* Use Uri.base.resolve consistently. Ensure folder path for sdk root. Fix test.
* Fix main_dart for frontend_server build target
* Reintroduce .packages file, add README.md, revert changes to licenses_flutter
* Run analyzer on frontend-server. Update .packages deps so tests can be run too.
* Add analyzer options file
* Clean up dependencies
* Add frontend_server files to license file back
* Fix comment in analysis_options.yaml
* Run frontend_server tests in travis
* Update licenses
* Change a+x permission on travis/test.sh
* pub get before pub run test
* Fix path to when
* Clarify accept/reject instructions
* Formatting, fixed docs, style
* Update license script to skip .travis.yml, when/example. Update license file.
* Update style nits
* Fix license
* Trim license extracted text. Fix licenses
* Update licenses_third_party signature
* Few more tests
* Update dart license
* Update dart license
* Style changes. Fix return value for Future<Null>