* Use UriConverter from context for test
* Fix type
* Pass URI converter using installHook
* Fix formatting
* Fix formatting in test
* Add comment about URI converter
The flag is true by default so the behavior does not change.
Next steps:
Use the flag for updated debugger module names:
- Frontend server: make the current behavior controlled
by the flag non-conditional
- Frontend server: add more debugging names changes under
the same flag, false by default
- Dwds: make changes required for the new module names.
- Flutter tools: when matching dwds changes roll to flutter,
pass the flag to the frontend server again.
- Cleanup:
- Frontend server: make new behavior default
- Flutter tools: remove uses of the flag.
- Frontend server: remove the flag.
Towards: https://github.com/dart-lang/webdev/issues/1692
Helps: https://github.com/flutter/flutter/issues/106727
* [flutter_tools] [dap] Ensure DAP sends app.stop/app.detach during terminate
Fixes an issue where the flutter_tester device may not be cleaned up correctly if we just terminate the Flutter process.
* Update integration test expectations
* Revert accidental commit
Fuchsia will soon remove all support for Component Framework version 1
components (recognized by component manifests ending in `.cmx`).
Notably, some of the `flutter` tool commands for Fuchsia devices--
notably, but not limited to, those related to CFv1--are outdated, and
either do not work today or soon won't work.
This PR removes the outdated components and commands, replacing some
with the newer version, or simply removing the non-working features,
in some cases.
* Check for bad characters in path on Windows build
* Doc comments
* Fix formatting
* Commenting/formatting
* Link to issue in comment
* Comments, formatting
* Global var rename
Speedup coverage test runs by using (new) coverage handle with caching.
On a `flutter test --coverage` run on `packages/flutter` the runtime goes from ~828 seconds to ~617 seconds, or a ~25% reduction in time spent (testing without coverage takes ~236 seconds so the overhead of `--coverage` in this case goes from ~592 seconds to ~381 seconds, or a ~35% reduction).
* [flutter_tools] [dap] Add support for passing env variables to spawned processes
* Use named args
* Use in-memory fs and FakePlatform
* Pass filesystem style to MemoryFileSystem
* Remove periods from pub --help command descriptions
* Add trailing period consistently
* Remove added period from PackagesInteractiveGetCommand description
* Verify line ending for first line of command description
* Update _allowedTrailingPatterns to validate that lines end with only one period, bang, or colon
* Ensure build is done in incremental mode.
This allows for faster bootstrapping of the compiler from previously created dill file.
Fixes https://github.com/flutter/flutter/issues/107183
* Avoid initializeFromDill in aot mode
* Update tests
The `flutter doctor` command uses `vswhere.exe` to verify the Visual Studio installation. This `vswhere.exe` is known to encode its output incorrectly. This is problematic as the `description` property is localized, and in certain languages this results in invalid JSON due to the incorrect encoding.
This change introduces a fallback to our `vswhere.exe` output parsing logic: if parsing JSON fails, remove the `description` property and retry parsing the JSON.
This fix was also tested on the outputs provided here: https://github.com/flutter/flutter/issues/106601#issuecomment-1170138123
Addresses https://github.com/flutter/flutter/issues/106601
Previously developers had to edit their `Runner.rc` file to update their executable's version information. Now, version information will automatically be set from `flutter build`'s arguments or the `pubspec.yaml` file for new projects.
Addresses https://github.com/flutter/flutter/issues/73652
* 9508a368d Roll Dart SDK from 692562354d6d to d3b8091c30f0 (1 revision) (flutter/engine#34273)
* a2985c034 Roll Fuchsia Linux SDK from F1U6IH2Nf... to aRT7s0Yct... (flutter/engine#34251)
* 54867f360 Roll Skia from bdd0205ae470 to 4345a2ea731a (1 revision) (flutter/engine#34268)
* 98221a22d Clean up text input configuration in clearTextInputClient (flutter/engine#34209)
* b9e02cc83 Adds a license check shard to CI (flutter/engine#34274)
* 1daf7ba98 [Impeller] Metal:Reset Encoder viewport and scissor rect in case the command specifies no opinion (flutter/engine#34252)
* 83b9a591a [Linux] remove duplicate clone_string() in favor of g_strdup() (flutter/engine#34031)
* Don't use .packages
* Another attempt
Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org>
Add an integration test that verifies that `flutter build windows` produces the expected executable. In the future, this will be used to test that version information is properly stamped on the executable.
Part of https://github.com/flutter/flutter/issues/73652.
Currently CMake is tested entirely through `build_linux_test.dart`. However, CMake is also used for Windows builds. This adds additional "generic" tests:
1. Parsing CMake files
2. Generating CMake config files.
In the future, this will be used to test that generated CMake config files contain the expected version information, which will be used to flow version information to Windows executables.
Part of https://github.com/flutter/flutter/issues/73652.
This PR adds extra timings for a hot reload.
As an example, before a user might see
> Performing hot reload...
> Reloaded 1 of 788 libraries in 554ms.
With this PR it would instead be something like
> Performing hot reload...
> Reloaded 1 of 788 libraries in 554ms (compile: 33 ms, reload: 153 ms, reassemble: 310 ms).
* Fix issues running integration tests through DAP
These adapters were incorrectly trying to connect a DDS instance even when Flutter would create its own. This change disables DDS in the DAP layer and leaves it to Flutter (although it passes `--no-dds` on to Flutter if provided to the DAP process).
Also fixes an issue where we would unnecessarily connect the VM Service for tests even in 'noDebug' mode because of a change/fix that now includes a 'vmServiceUri' in the `test.startedProcess` event.
Flutter uses `vswhere.exe` to find Visual Studio installations and determine if they satisfy Flutter's requirements. However, `vswhere.exe`'s JSON output is known to contain bad UTF-8. This change ignores bad UTF-8 as long as they affect JSON properties that are either unused, or, used only for display purposes by Flutter.
Fixes: https://github.com/flutter/flutter/issues/102451
Adds a bit more clarifying documentation to the implementation of the
outputFollowsExit case, and adds tests that verify the behaviour of
stderr, stdout of processes launched via FakeProcessManager.
Specifically:
* Verifies that stderr, stdout are not emitted immediately after process
exit if outputFollowsExit is true. They must be emitted at least one
turn through the event loop later.
* Verifies that ProcessResult.stderr, stdout have the type documented
according to the encoding passted to Process.run/runSync:
* List<int> if null is passed as the encoding.
* String (in the default system encoding) if no encoding is specified.
* String (in the specified encoding) if an encoding is specified.
This is additional testing relating to refactoring landed in:
https://github.com/flutter/flutter/pull/103947
Issue: https://github.com/flutter/flutter/issues/102451
`VisualStudio` calls `vswhere.exe` to find Visual Studio installations and determine if they satisfy Flutter's requirements. Previously, `VisualStudio` stored the JSON output from `vswhere.exe` as `Map`s, resulting in duplicated logic to read the JSON output (once to validate values, second to expose values). Also, `VisualStudio` stored two copies of the JSON output (the latest valid installation as well as the latest VS installation).
This change simplifies `VisualStudio` by introducing a new `VswhereDetails`. This type contains the logic to read `vswhere.exe`'s JSON output, and, understand whether an installation is usable by Flutter. In the future, this `VswhereDetails` type will be used to make Flutter doctor resilient to bad UTF-8 output from `vswhere.exe`.
Part of https://github.com/flutter/flutter/issues/102451.
* Use libraryFilters flag to speed up coverage collection
* Allow libraryNames to be null
* Unconditionally enable the reportLines flag
* Fix analysis errors
Because this class has some subtle behaviour with regards to control of
exit timing and when and how it streams data to stderr and stdout, it's
worth adding unit tests for this class directly, as well as (in a
followup patch) for FakeProcessManager.
This is additional testing relating to refactoring landed in:
https://github.com/flutter/flutter/pull/103947
Issue: https://github.com/flutter/flutter/issues/102451
`FakeProcessManager` is a test-oriented implementation of `ProcessManager`
that simulates launching processes and returning `ProcessResult` objects
whose `exitCode`, `stdout`, `stderr` can be used to write platform-portable,
hermetic tests that don't rely on actually launching processes from
executables on disk. Its `run` and `runSync` methods provide asynchronous and
synchronous variants of this functionality.
Previously, the behaviour of `run` and `runSync` were inconsistent with
regards to the treatment of the `stdoutEncoding` (similarly,
`stderrEncoding`) parameters:
`run`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
String in UTF-8 encoding. This was incorrect. The behaviour as
specified in `ProcessResult.stdout` is that in this case, a raw
`List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
a `String` in the `io.systemEncoding` encoding. This was correct.
* If the encoding was non-null, `ProcessResult.stdout` was returned as a
`String` in the specified encoding. This was correct.
`runSync`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
`List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
specified in `ProcessResult.stdout` is that in this case, a raw
`List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
`List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
specified in `ProcessResult.stdout` is that in this case, a String a
`String` in the `io.systemEncoding` encoding should be returned.
* if the encoding was non-null, `ProcessResult.stdout` was returned as a
`String` in unknown (but probably UTF-8) encoding. This was incorrect.
The behaviour as specified in `ProcessResult.stdout` is that in this
case, a `String` in the specified encoding should be returned.
`_FakeProcess`, from which we obtain the fake stdout and stderr values now
holds these fields as raw `List<int>` of bytes rather than as `String`s. It
is up to the user to supply values that can be decoded with the encoding
passed to `run`/`runAsync`.
`run` and `runAsync` have been updated to set stdout (likewise, stderr) as
specified in the `ProcessResult` documentation.
This is pre-factoring for #102451, in which the tool throws an exception
when processing the JSON output from stdout of the `vswhere.exe` tool,
whose output was found to include the `U+FFFD` Unicode replacement
character during UTF-8 decoding, which triggers a `toolExit` exception
when decoded using our [Utf8Decoder][decoder] configured with `reportErrors` =
true. Because `FakeProcessManager.runAsync` did not previously invoke
`utf8.decode` on its output (behaviour which differs from the non-fake
implementation), it was impossible to write tests to verify the fix.
Ref: https://api.flutter.dev/flutter/dart-io/ProcessResult/stdout.html
Issue: https://github.com/flutter/flutter/issues/102451
[decoder]: fd312f1ccf/packages/flutter_tools/lib/src/convert.dart (L51-L60)
* Provide flutter sdk kernel files to dwds launcher instead of dart ones
* Update log test to report all warnings
* Update licences for new files
* Addressed CR comments
* Addressed CR comments
* Implement trackpad gestures in framework
* Touch and Pan/Zoom pointers have separate IDs now
* Handle trackpad pointer device type
* Respect supportedDevices for pan/zoom events
* Update after rebase
* Fix check failures
* Avoid error with very short drags
* Address feedback
* Refactor drag event handler
* Address more feedback
* Add some missing punctuation