* Support exposing the InspectorService over the Flutter
service extension protocol as well as the observatory protocol.
We will probably remove most of the observatory protocol support once a
couple versions of the Flutter IntelliJ plugin have shipped that use the
Flutter service extension protocol. The only reason to continue supporting
the observatory protocol is it will allow using the inspector when paused
at a breakpoint.
* Turn support for sync-async on in Flutter. With this feature
execution of async functions starts immediately instead of it
being delayed by one microtask tick.
* Address review comments.
* Adjust some stack trace expectations which are slightly different with
--sync-async turned on.
* Handle error count reported by frontend.
Extend compilation result from single string to a structure(string filename and integer error count).
* Use ?.
* Include engine roll with dart sdk roll.
* parse(onError) -> tryParse
* Make '?? throw' more readable and avoid issue with analyzer
* Fix test so it mocks compiler output including errors count
* A new UI is being designed to make the unused reload messaging clearer,
the UI will use the coverage data to highlight lines in the UI that were not executed during a reload.
In lieu of that we are turning off the unused reload messages experiment.
There were some issues in Dart2 also with this functionality
- source fingerprinting is not implemented in Dart2
- some additional synthetic functions are generated for invocation argument checking that are not appropriately filtered out.
Inlines the very small amount of work being done in _build() into
buildScriptSnapshot(). Eliminates a duplicate (and un-awaited) call to
_writeFingerprint.
* Sync .packages file as regular file.
Currently .packages file is treated specially as DevFSStringContent to accommodate package-file rewrite when it is sent to the device for dart1 compilation. In dart2 we need to treat .packages as regular file because from frontend perspective it's just a normal input file.
We are about to begin building gen_snapshot as a multi-arch binary,
which when run as x86_64 will generate arm64 AOT output, and when run as
i386 will generate armv7 AOT output.
Currently, gen_snapshot is an x86_64 binary, so this change is
effectively preventative in nature, and is a no-op with the current
snapshotter.
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"
This reverts commit e59651f925.
* More thenReturn to thenAnswer when mocking Futures
* Revert "More thenReturn to thenAnswer when mocking Futures"
This reverts commit 194d2cf417 as we are reverting engine roll.
* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""
This reverts commit 52c9e96b30.
* Add dependency override
* Fix issue
* Move mockito to 3.0.0-alpha.
This is needed so it matches mockito version used internally.
* Pick up +2 for the fixes
* Fix whenReturn in fuchsia_remote_debug_protocol
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
Adds a package that will support connecting to and debugging devices with multiple instances of the Dart VM, and operate on multiple Isolates and Flutter Views.
Currently supports connecting to all existing Dart VMs and extracting information about all Flutter Views running across each VM.
* traverse dependencies and dev dependencies separately
* separate dev and reg deps
* update pubspecs
* add checksum string and update transitive dep string. Add additional verify command to check checksum
* cleanup comments
* add missing space, quote, run verify-onlu from bot script
* rerun tool with fixed string
* ensure correct working directory and bump versions
* flutter not flutterRoot
* roll engine version to 6280adbfb1f9f63cdc6179b9b78634add1e4f2e3
* Correctly handle previewDart : false setting in AnalysisServer and
AnalyzeOnce classes.
* Update the following packages
- dart-petitparser to 1.7.5
- dart-xml to 3.0.3
- image to 1.1.30
These updates fix some of the strong mode errors we were encountering
while running flutter tests.
* Update dependencies with forced upgrade.
Now that https://github.com/flutter/flutter/issues/15261 is fixed, do the update with upgrade.
* Update test package use following upgrade
* Replace addOption(allowMultiple) with addMultiOption
Make flutter test support the --track-widget-creation flag.
Add widget creation location tests. Tests are skipped when
--track-widget-creation flag is not passed.
* Create frontend compiler in `flutter test` lazily.
This is needed to avoid unwarranted runtime dependencies on Artifacts,
for example when in non-preview-dart-2 mode.
Refactor the compilation-related code into _Compiler class.
Some file I/O is piped from OS processes and never completes,
so without havign a timeout on the recording serialzation, we
end up waiting forever on that I/O to complete.
* Fix `flutter test --preview-dart-2` following last dart roll.
Incremental compiler maintains single incremental dill file, so for every test compilation that dill file has to be copied away for execution.
* Fix lints
* Pass entry points JSON files to front-end server (#15180)
* Fix ios/debug build which uses 'flutter build aot': do not require entry points files and disable AOT transformations in this mode
* Add to Artifacts, and add optional arguments to entry points for flut… (#15185)
Add to Artifacts, and add optional arguments to entry points for flutter run and test to allow for wiring up the same with preview-dart-2 internally
* Changing packages uri here is not necessary
* Use depfile in --preview-dart-2 mode.
* Generate and use frontend_server.d to guard against reusing outdated dill files when frontend_server changes.
* Roll engine to c88ba37c794f57982374bb53a694301198cad593.
Changes since last roll:
- move generated entry points JSON out of flutter_patched_sdk
- List missing core lib bigint_patch.dart source for new Bigint implementation (#4735)
- Skip over .emf-files. (#4739)
- Roll dart to ee15c8eb689791f6777eb3f6b0a1e9c58ff0671b.
* defaultValue -> orElse
* Run flutter tests in preview-dart-2 mode on travis flutter builds.
* Run dart2 tests on osx. Run dart tests in dart2.
* Fix name camelCase
* Default options to empty array, rather than null
* Troubleshoot failures
* More logging
* Troubleshoot: run single test
* Troubleshoot: run 15 tests
* Troubleshoot: run 15 tests with fix
* Try limit concurrency to 1
* Limit concurrency for preview-dart-2 tests to 4
* Move dart2 tests to allow_failures section
* Reinstate tests_dart_2 shard
* Raise concurrency to 8
* Reuse compiler across multiple test runs
* Allow to switch entry points when recompiling.
Actually use single compiler to incrementally recompile all tests executed by 'flutter test'.
* Remove leftover commented code
* Fix comment
* Lints
Adds more actionable error messages for users of the most common Linux
distributions. We could improve this by checking the current
distribution and emitting only the appropriate error message. We could
further improve that by only emitting the install instructions if we
determine the appropriate package is not installed.
See: https://github.com/flutter/flutter/issues/6207
* Revert "Revert "Add android license verification to doctor and some refactoring" (#14727)"
This reverts commit d260294752.
* Add tests, fix sdkManagerEnv and use it consistently, and rearrange Status object model
* AnsiSpinner needs to leave the cursor where it found it.
* fix tests
* Const constructor warning only shows up on windows...?
* Avoid crash if we can't find the home directory
* Make pathVarSeparator return a string in the mock
* Implement review comments
* Fix out-of-order problem on stop
Dart is migrating to .dart_tool/ as the location for cached artifacts
and other temporary files generated by tooling in the SDK. As part of
this, pub will be migrating from .pub to .dart_tool/pub.
In future, this path will also be used for other tooling, such as package:build.
30+4 has made some changes to the remoting protocol that are incompatbile
with a test harness running 30+3 (e.g. adding a type='initial' field to the
first message)
* Fix snapshot fingerprinting in --preview-dart-2 mode.
This is a follow up to PR #14775 - instead of treating dill file
as an input treat as intermediate file and don't fingerprint it.
Make sure to always use original main Dart file as an entry
point for fingerprint calculation.
This fixes an issue that AOT snapshot would not be recompiled in
the preview-dart-2 mode if entry point changes, e.g.
$ flutter build aot -t t/x.dart --preview-dart-2
$ flutter build aot -t t/y.dart --preview-dart-2
The second invocation would not build AOT snapshot.
(This issue is visible on the microbencmarks bot)
* Created plumbing but has stream problem
* testing with makePipe
* Trying pipe but not really getting anywhere
* works by repeatedly reading line
* Minor cleanup
* works
* Clean up pipe after use.
* Move the last status forward
* Make sure failed script commands bubble up
Reports from that commit included:
* Doctor hanging
* Doctor prompting to install JDK
* AnsiStatus.cancel() printing elapsed time and extra newline
* Printing extra spinner character at the end of each line
If compiler failed to produce Kernel binary then compile(...) returns
null to the caller. If we don't check for null we end up trying to
run file called "null" which causes a very confusing crash of the
flutter_tester.
* Use already downloaded dart sdk for frontend_server.
This is follow-up to https://github.com/flutter/flutter/pull/14610
* Remove reference to engine dart-sdk from artifacts
* Remove unused imports
* WIP to switch back to solution where dart sdk is downloaded into bin/cache/dart-sdk, but it is 'flutter precache -a' that can download all dart sdks for other platforms under bin/cache/artifacts/engine/<platform>/dart-sdk
* Download all dart sdks when 'flutter precache -a'
* Initial version, seems to work
* Unit test for android license checker
* Cleanups
* Windows analyzer wants const.
* Refinements to timeout
* review comments
* Forgot a nit
Pull code out of flx.dart:assemble() to make flx.dart:buildAssets
which creates the AssetBundle. This will allow us to create just
this instead of an entire FLX.
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
* Revert "Revert "Reduce xcodebuild noise #2" (#14641)"
This reverts commit 2d47481f1e.
* Stop scrapping xcodebuild output, get the right build settings
* clone the command params first
In getFlutterRoot(), scripts loaded via data: URIs are URI encoded.
getFlutterRoot() scans the contents of the data for the file:// URI path
of the Flutter SDK, which itself is URI-encoded. The end result is that
if the SDK path contains a space, the embedded file:// URI will contain
a %20. When this is encoded in a data: URI, the contents are
URI-encoded, resulting in %2520, since the % is encoded to %25.
This patch decodes the data: URI before extracting the SDK file:// URI.
The Flutter engine now supports package: and file: imports that resolve
to paths on disk that include spaces and other URI-escaped characters.
This patch eliminates the restriction that Dart source paths not include
%20 (or other URI-escaped characters) in their paths in flutter_tool
tests.
* Reduce noise in xcodebuild stdout
* Reduce output from cleaning, from non failing xcode outputs and from script
* Check xcodebuild clean's exit code
* Revert "Reduce noise in xcodebuild stdout"
This reverts commit 222a26f55f.
* Roll engine to pre-dart roll
* Roll engine to pick up updated dart
* Apply Map changes
* Move to dev.22
* Fix some analysis issues
* Silent analyzer
* More consts
* More const massaging
* Yet more const massaging
* Yet more const massaging
* Use nonconst()
The current ARM64 back end generates code that crashes on some devices,
including Pixel phones. With this change, the android-arm64 target will
not be used by "flutter run" unless explicitly requested.
This is intended as a workaround until we can roll out an engine with the
required Dart VM fix.
See https://github.com/flutter/flutter/issues/14454
By default flutter run will build a 64-bit APK if the attached Android device
is 64-bit. Specifying --target-platform=android-arm will deploy a 32-bit APK
to a 64-bit device.
Fixes https://github.com/flutter/flutter/issues/14526
There were some problems I introduced with the last PR for this. It passed the test, but failed in practice.
This adds tests for those failure cases, adds a "--help" and fixes the test so that it doesn't try and actually download MinGit as part of the Windows test.
I added package:platform as a dependency, so I did a force upgrade on the packages.
Also, re-enabling 'create package' in the cache warming code, now that #14448 is fixed.
Looks in default install locations on Mac, Linux and Windows for VS Code. If found, looks in default extension location to see if Dart Code is installed.
If VS Code is not installed, nothing is reported. If VS Code is installed without Dart Code, a warning is shown.
* Reject requests for hot reload if a hot reload is already in progress.
Fixes#14184
* Implement TODO, verifying further hot reloads complete sucessfully.
* Fix year on new file.
* Add missing type annotations to fix lints
* Add run_machine_concurrent_hot_reload to manifest for CI
* Reformat document
... but undo things that cause lints (like single-line ifs)
* Extract std stream transformations
* Make inProgressHotReload private
* Disallow all types of reload while hot reload in progress
* Simplify code handling in-progress hot reloads
This adds an API for defining the semantic node traversal order.
It adds a sortOrder argument to the Semantics widget, which is a class that can define a list of sort keys to sort on. The keys are sorted globally so that an order that doesn't have to do with the current widget hierarchy may be defined.
It also adds a shortcut sortKey argument to the Semantics widget that simply sets the sortOrder to just contain that key.
The platform side (flutter/engine#4540) gets an additional member in the SemanticsData object that is an integer describing where in the overall order each semantics node belongs. There is an associated engine-side change that takes this integer and uses it to order widgets for the platform's accessibility services.
Previously, the iOS ApplicationPackage subclasses did not mark the
bundleID constructor parameter as @required. This is passed up to the
ApplicationPackage constructor as the id parameter which is already
marked @required and is asserted to be non-null.
When diagnosing a failed Xcode build, if neither the development team
(for automatic provisioning) nor the provisioning profile (for manual
provisioning) is set, display the appropriate error message. Previously,
this method would not output the appropriate error message if a
only a development team was set.
* Flatten change out from lots of merges and temporary hacks for #7224
* Expand fakes to cover cases where doctor passes
* -v != --verbose
* Cosmetic touchups
* delint
* Clean up summary line, add a switch for review comments
* Review comments
* nit
* review comment
* review comments
* [kernel/flutter] Improve speed of first hot reload
* [kernel/flutter] Improve speed of first hot reload
* Revert "[kernel/flutter] Improve speed of first hot reload"
This reverts commit f3dc133878.
* Revert "[kernel/flutter] Improve speed of first hot reload"
This reverts commit f7bcb082b0.
* Revert "Revert "[kernel/flutter] Improve speed of first hot reload""
This reverts commit 73c7a1a8e8.
* [kernel/flutter] Improve speed of first hot reload
Do so by not evicting unnecessary paths (while still evicting paths
that was changed between the generation of the package file and the
initial upload).
* Fix grammar in method name
* Fix bad merge
* Add method to super class
* Make the current command injected into the AppContext, allowing
other classes to inject the current command.
* Introduce `AssetBundleFactory`, an injected factory class for
spawning instances of `AssetBundle`. This allows other run contexts
to use custom asset bundling logic.
* Clean up RunCommand by removing a 'packages' argument that duplicated
a global argument by the same name (and for the same purpose).
Duplicate arguments are confusing and error-prone.
When running with --preview-dart-2, host variant of the engine is
required. Simulator builds, like device builds, should resolve
host_RUNTIMEVARIANT_OPTVARIANT, not host_RUNTIMEVARIANT_sim_OPTVARIANT.
* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
AndroidSdk and AndroidStudio depends relatively heavily on filesystem
access to locate installed tools. Testing code that relies on either of
these classes benefits from a utility method to generate a
legitimate-looking Android SDK directory layout for testing.
flutter doctor --android-licenses requires Android sdkmanager version 26
or later. When sdkmanager is not available (SDKs earlier than v25),
direct users to SDK upgrade instructions. When it's installed but not
v26 or later, emit instructions to run sdkmanager --update.
Moves MockProcess, MockStdio and a few other useful mocks from
packages_test.dart to common/mocks.dart. These are useful for testing
code with interactive IO.
This adds a new constructor to MockProcess to provide additional flexibility.
Convenience getters for the the path to the Android SDK manager and the
currently installed version of the tool.
Pre-factoring to support better checks around the --android-licenses
command, which uses a feature of the SDK manager that is unsupported in
older versions of the tool.
* Default to strong for 'flutter test --preview-dart-2' mode
* Remove empty line
* Dont init to null
* Break up line to make it more readable
* Add missing type annotation