Consistently handle Int32/Int64 types on both 32-bit and 64-bit versions
of iOS. Drop usage of the obsolete hex string encoding for BigInt types.
Fixes https://github.com/flutter/flutter/issues/21313
In cases where a valid IsolateConfiguration cannot be inferred, (e.g.,
settings.kernel_list_asset is missing) RunConfiguration can be created
with a null IsolateConfiguration. In such cases, bail out early with
kInvalidSettings.
Also adds a redundant paranoid check to EmbedderEngine::Run.
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.
This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.
Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.
This also updates all existing sub-targets to be testonly.
This relands commit 4e4fb4608da95d198b0e796478462285ab974a3c, which was
reverted in commit 566db0ecb8f293bb9f7ff1fc39076b08336e0148. Rather than
running as prebuilt_dart_action, we use dart_action to ensure the
frontend snapshot it compatible with the VM on which it's executed.
This reverts commit 4e4fb4608da95d198b0e796478462285ab974a3c.
This broke dynamic release mode builds of
//flutter/runtime:runtime_fixtures_kernel (likely all product-mode
builds).
Compile embedder unit test Dart to kernel
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.
This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.
Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.
This also updates all existing sub-targets to be testonly.
* Support real fonts in 'flutter test'
Change the order of font_managers to query in font_collection
so that dynamic_font_manager fonts will be resolved.
Tested with test case in `flutter/flutter` repo:
`packages/flutter/test/rendering/localized_fonts_test.dart`
Ensured:
- A font loaded with FontLoader will be used
- The default 'Ahem' font is still loaded by default
The test above still cannot be fixed because FontLoader and the
underlying mechanisms don't cover Locale-specific font loading
and therefore a CJK font-family won't be able to be loaded as needed
for that test.
Fixes#17700
* Format fixup
libtrace-provider has libtrace listed as a dependency when really it
does not have any such dependency. This lets trace clients use
libtrace-provider as a dependency when what they really mean is libtrace.
This errant dependency in trace-provider is being fixed, which
means we need to fix these clients.
After bumping the targetSdk of Flutter apps to 28, the keyboard doesn't open anymore when inputting text on an Android Pie devices. The problem is caused by a change on the way the focus in handled: when the call `mImm.showSoftInput(view, 0);` is made, the currently focused view is the `DecorView` from the `Activity` hosting Flutter but the passed view reference (`view` argument) is the `FlutterView`. As the `InputMethodManager` checks if both views are the same before showing the keyboard, it never appears because the `FlutterView` never has focus.
As Flutter doesn't have any input views as far as the Android side is concerned, the focus should always stay on the `FlutterView` itself and thus, this PR changes the `TextInputPlugin` to focus on the `FlutterView` as soon as it's created, fixing the keyboard issue.
Co-authored-by: Igor Borges <igorborges12@gmail.com>
Technically both of these are part of the public API exposed in
Flutter.framework. Neither is used within Flutter itself, and both have
been broken since the removal of Dart 1 support, so eliminating rather
than marking unavailable.
In Dart 2, runtime checked mode has been eliminated. Many of these type
checks have been moved to static compile-time checks, the remainder are
enforced at runtime, and are no longer optional.
Since the migration to Dart 2, the first positional command-line
argument to flutter_tester has been a Dart kernel .dill file. Use
Settings::application_kernel_asset here for consistency/clarity.
Pushes the check up front so that we don't always land on the
application_kernel_list_asset error message, which may be misleading to
readers.
Also switches the empty check to only emit in debug builds, since this
is almost certainly not a runtime error but a programmer error.
Reduces spurious error log messages in GLContextMakeCurrent() attempting
set up the GR context:
[ERROR:flutter/shell/gpu/gpu_surface_gl.cc(42)] Could not make the context current to setup the gr context.
Adds a check/error message for the case where running from kernel list,
but application_kernel_list_asset is left unset (or empty).
Adds a check/error message for the case where we fail to load the
application_kernel_list_asset specified in the settings.
The service protocol's ListViews method needs to return description data for
each engine in the process. Previously ListViews would queue a task to each
UI thread to gather this data. However, the UI thread might be blocked from
executing tasks (e.g. if the Dart isolate is paused), resulting in a deadlock.
This change provides a copy of the engine's description data to the
ServiceProtocol's global list of engines, allowing ListViews to run without
accessing any UI threads.
Fixes https://github.com/flutter/flutter/issues/24400