- 06 Jul, 2023 1 commit
-
-
Michael Goderbauer authored
PLUS: clean-up of all the unreachable stuff.
-
- 05 Jul, 2023 2 commits
-
-
Helin Shiah authored
This change is for an internal IDE client to send a custom hot reload request, as custom requests from the client must start with `$/`. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. (this PR is linked internally) - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
Piotr FLEURY authored
# Proposal I suggest to make possible to specify .env files to the --dart-define-from-file in addition to the Json format. # Issue Close #128667
-
- 29 Jun, 2023 2 commits
-
-
Martin Kustermann authored
To avoid analyzer warnings when utf8.encode() will return the more precise Uint8List type, we use const Utf8Encoder().convert() which already returns Uint8List See https://github.com/dart-lang/sdk/issues/52801
-
Tae Hyung Kim authored
Based on the [message format syntax](https://unicode-org.github.io/icu/userguide/format_parse/messages/#examples) for [ICU4J](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html). This adds new syntax to the current Flutter messageFormat parser which should allow developers to add locale-specific date formatting. ## Usage example ``` "datetimeTest": "Today is {today, date, ::yMd}", "@datetimeTest": { "placeholders": { "today": { "description": "The date placeholder", "type": "DateTime" } } } ``` compiles to ``` String datetimeTest(DateTime today) { String _temp0 = intl.DateFormat.yMd(localeName).format(today); return 'Today is $_temp0'; } ``` Fixes https://github.com/flutter/flutter/issues/127304.
-
- 27 Jun, 2023 1 commit
-
-
Ben Konyi authored
Reland "Fix issue where DevTools would not be immediately available when using --start-paused (#126698)" (#129368) **Original Description:** > Service extensions are unable to handle requests when the isolate they were registered on is paused. The DevTools launcher logic was waiting for some service extension invocations to complete before advertising the already active DevTools instance, but when --start-paused was provided these requests would never complete, preventing users from using DevTools to resume the paused isolate. > > Fixes https://github.com/flutter/flutter/issues/126691 **Additional changes in this PR:** The failures listed in https://github.com/flutter/flutter/pull/128117 appear to be related to a shutdown race. It's possible for the test to complete while the tool is in the process of starting and advertising DevTools, so we need to perform a check of `_shutdown` in `FlutterResidentDevtoolsHandler` before advertising DevTools. Before the original fix, this check was being performed immediately after invoking the service extensions, which creates an asynchronous gap in execution. With #126698, the callsite of the service extensions was moved and the `_shutdown` check wasn't, allowing for the tool to attempt to advertise DevTools after the DevTools server had been cleaned up. --------- Co-authored-by:
Zachary Anderson <zanderso@users.noreply.github.com>
-
- 23 Jun, 2023 1 commit
-
-
David Iglesias authored
Flutter web uses requireJS in `debug` mode to assemble a DDC-compiled app from a bunch of small files ("modules"). This caused that `canvaskit.js` (and all other modules that used a browserify-like loading header) didn't work because they attempted to use the `define` function provided by Flutter's instance of `requireJS` (which kept the defined modules private, rather than as globals on the page, as the users of the JS expected). A [fix](https://github.com/flutter/engine/pull/27342) was added to `flutter/engine` to trick loaders into *not* using the `requireJS` module loader, but a recent change in the fix's js-interop layer *subtly* changed its JS output on the page (objects went from `undefined` to `null`), causing this: * https://github.com/flutter/flutter/issues/126131 (and others) This PR hides a bit of code that is commonly used by module loaders to decide that they may use the `define` function provided by requireJS (so the engine workaround can be removed). ## Next steps * https://github.com/flutter/engine/pull/42941 ## Issues Partially addresses: https://github.com/flutter/flutter/issues/126131 (and others) ## Tests * Added a unit test to ensure the `delete` stays * Manually tested with the Gallery app in `debug` mode with a bunch of user-supplied scripts that currently fail to load. * Also tested hot restart as suggested by @nshahan
-
- 22 Jun, 2023 2 commits
-
-
gmackall authored
Unpins path_provider_android where it is pinned. Follows the same steps as https://github.com/flutter/flutter/pull/128898. Fixes https://github.com/flutter/flutter/issues/116376
-
Elias Yishak authored
Prevent the cli from crashing when a user selects a number that is not valid for `flutter run` device selection Fixes issue: - https://github.com/flutter/flutter/issues/129191 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 21 Jun, 2023 1 commit
-
-
Christopher Fujino authored
Works around part of https://github.com/flutter/flutter/issues/128866
-
- 20 Jun, 2023 3 commits
-
-
Victoria Ashworth authored
This PR fixes issue of duplicate entries from `xcdevice list` cause devices to not show in `flutter devices`, `flutter run`, etc. When a duplicate entry is found, use the entry without errors as the authority. If both have errors, use the one with the higher SDK as the authority. Fixes https://github.com/flutter/flutter/issues/128719.
-
Lau Ching Jun authored
The `getIsolate` method returns the full list of libraries which can be huge for large apps. Using the more speficic API to only fetch what we need improves hot reload performance. *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
Tae Hyung Kim authored
The file was becoming harder to deal with as it manually sets up a /lib/l10n directory with a `MemoryFileSystem` in every single test. This PR wraps this process in a helper function `setupLocalizations` and also provides a helper function `getGeneratedFileContent` which helps fetch the respective output file given the locale string.
-
- 19 Jun, 2023 1 commit
-
-
Jason Simmons authored
Cache.flutterRoot is set within testUsingContext and will be uninitialized the first time test suite setup is invoked.
-
- 16 Jun, 2023 2 commits
-
-
-
Danny Tuppeny authored
When building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter). As well as passing a VM Service URI directly, we support passing a file that can be polled for it. This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run `dart --write-service-info=foo.json my_file.dart` and then poll that file which the VM will write) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see https://github.com/Dart-Code/Dart-Code/issues/3353) to provide a VM Service URI once the app is up and running. Fixes https://github.com/Dart-Code/Dart-Code/issues/4577.
-
- 15 Jun, 2023 4 commits
-
-
Dery Rahman Ahaddienata authored
Command instruction for clearing dart pub cache is somewhat wrong. Instead of `clear`, `clean` is the correct one. Ref: https://dart.dev/tools/pub/cmd/pub-cache Fixes https://github.com/flutter/flutter/issues/128663 (Edited by @andrewkolos. Changed "related to" issue to "fixes" to link this PR to the issue).
-
Christopher Fujino authored
Part of https://github.com/flutter/flutter/issues/127135
-
Ian Hickson authored
Fixes https://github.com/flutter/flutter/issues/101525
-
Christopher Fujino authored
Fixes https://github.com/flutter/flutter/issues/112833 Most of the actual changes here are in [packages/flutter_tools/lib/src/version.dart](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605), while the rest is largely just addressing changes to the constructor of `FlutterVersion` which now has different dependencies. This change makes `FlutterVersion` an interface with two concrete implementations: 1. `_FlutterVersionGit` which is mostly the previous implementation, and 2. `_FlutterVersionFromFile` which will read a new `.version.json` file from the root of the repo The [`FlutterVersion` constructor](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605R70) is now a factory that first checks if `.version.json` exists, and if so returns an instance of `_FlutterVersionFromGit` else it returns the fallback `_FlutterVersionGit` which will end up writing `.version.json` so that we don't need to re-calculate the version on the next invocation. `.version.json` will be deleted in the bash/batch entrypoints any time we need to rebuild he tool (this will usually be because the user did `flutter upgrade` or `flutter channel`, or manually changed the commit with git).
-
- 14 Jun, 2023 2 commits
-
-
Arne Molland authored
The current implementation of macOS flavor support (#119564) assumes a bundle directory that differs from both the iOS implementation and the official documentation. The [documentation](https://docs.flutter.dev/deployment/flavors) instructs developers to suffix their Xcode build configurations with `-<flavor>`, but the implementation assumes a space: https://github.com/flutter/flutter/blob/5fd9ef4240d3fc239f042f49b8eb1ad24260091f/packages/flutter_tools/lib/src/macos/application_package.dart#L174-L178 Whereas the iOS implementation, which is the reference for the docs, assumes a `-<flavor>` suffix: https://github.com/flutter/flutter/blob/a257efc2841ed7042322fbd043f0983e705d7da2/packages/flutter_tools/lib/src/ios/xcodeproj.dart#L482-L488 This change replaces the empty space with the `-` character which is in line with the documentation and iOS implementation, as well as removing the sentence-casing applied to the flavor name; every bundle built with a flavor keeps the original flavor name in its filename. *List which issues are fixed by this PR. You must list at least one issue.* #122684. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
gmackall authored
Unpins flutter_plugin_android_lifecycle where it is pinned. I then 1. ran `flutter update-packages --force-upgrade` (but only committed the changes within `dev/integration_tests/gradle_deprecated_settings/`, which is where it had been pinned) 2. followed by `./gradlew :generateLockfiles` from `dev/integration_tests/gradle_deprecated_settings/android/` (the lockfile was what was causing the CI dependency resolution failure, so this second step is the fix for that). See the reason it was pinned: https://github.com/flutter/flutter/pull/121847#discussion_r1124797112 followed by the PR that pinned it: https://github.com/flutter/flutter/pull/122043 Fixes https://github.com/flutter/flutter/issues/122039
-
- 13 Jun, 2023 1 commit
-
-
- 12 Jun, 2023 1 commit
-
-
Jonah Williams authored
Allow passing through the --enable-impeller flag to macOS.
-
- 09 Jun, 2023 5 commits
-
-
Andrew Kolos authored
rename generated asset manifest file back to `AssetManifest.bin` (from `AssetManifest.smcbin`) (#128529) Closes https://github.com/flutter/flutter/issues/128456, which is now linked to in a code comment in this change. Reopens https://github.com/flutter/flutter/issues/124883. This effectively reverts https://github.com/flutter/flutter/pull/126077 and is intended to be cherry-picked into stable.
-
Jason Simmons authored
Ignore app.stop events received before the app.detach response in attach integration tests (#128593) The app.detach command will close the VM service connection, which yields an app.stop event in the daemon protocol. The daemon does not guarantee any ordering between this event and the response to the app.detach. See https://github.com/flutter/flutter/issues/128546
-
William Hesse authored
Presubmit testing and CI testing of Flutter using a custom storage location for engine artifacts must be able to use the --fatal-warnings flag without failing due to the custom artifact location. This change adds an option that makes this warning non-fatal. The new --no-fatal-storage-url-warning flag makes the --fatal-warnings flag ignore the warning that a custom artifact download URL is being used by setting the environment variable FLUTTER_STORAGE_BASE_URL. Bug: #127683 - [X ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X ] I signed the [CLA]. - [X ] I listed at least one issue that this PR fixes in the description above. - [X ] I updated/added relevant documentation (doc comments with `///`).
-
Danny Tuppeny authored
The editor is set to hot-reload-on-save by default so saving while the debug session is starting currently prints an error: Failed to Hot Reload: app 'null' not found  This change skips the call to `app.restart` if the app hasn't started yet to avoid printing an error.
-
-
- 08 Jun, 2023 1 commit
-
-
Tess Strickland authored
This PR adds uses of the `--target-os` command line argument when building kernel sources for precompiled applications for supported target operating systems. The Dart CFE then: * treats `Platform.operatingSystem` as if it were defined as the constant string provided as an argument to the flag, * treats `Platform.pathSeparator` as the appropriate separator for that operating system, * attempts to constant evaluate the initializer for any field annotated with the `vm:platform-const` pragma, and * attempts to constant evaluate all calls to a method annotated with the `vm:platform-const` pragma. The `vm:platform-const` pragma can appear in either library or user code. If the attempt to constant evaluate the field initializer or method call fails, then an error is thrown at kernel compilation time. Addresses #14233. The tests in `packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart` have been adjusted properly to account for the new passed command line arguments.
-
- 07 Jun, 2023 4 commits
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/120408 Added two gradle tasks, one for grabing the application id, one for grabbing app link domains. Added a new vmservices to call these two gradle tasks and return the result. The expected work flow is that the devtool will first call a vmservices to grab all avaliable build variants. It will then choose one of the build variant and call this new services to get application id and app link domains.
-
Alexander Aprelev authored
Roll to engine to 4f4486b00be28183b482bbb74bbed25f4db153fe pick up dart to 3.1.0-169.0.dev. Changes since last roll ``` 4f4486b00b Roll dart to 3.1.0-169.0.dev (#42602) ``` Manual roll since rolling to dart 3.1.0-169.0.dev requires patching to expression evaluation in flutter tools
-
Andrew Kolos authored
Closes https://github.com/flutter/flutter/issues/106416. This PR adds a new `flutter config` setting named `jdk-dir`. When set, the tool will use the JDK found at this location for all Java-dependent tool operations such as building Android apps via gradle and running Android SDK tools.
-
Andrew Kolos authored
Fixes https://github.com/flutter/flutter/issues/127090. https://github.com/flutter/flutter/pull/122505 did a few things to speed up the first asset load that a flutter app performs. One of those things was to not include the main asset in its own list of variants in the asset manifest. The idea was that we know that the main asset always exists, so including it in its list of variants is a waste of storage space and loading time (even if the cost was tiny). However, the assumption that the main asset always exists is wrong. From [Declaring resolution-aware image assets](https://docs.flutter.dev/ui/assets-and-images#resolution-aware), which predates https://github.com/flutter/flutter/pull/122505: > Each entry in the asset section of the pubspec.yaml should correspond to a real file, with the exception of the main asset entry. If the main asset entry doesnât correspond to a real file, then the asset with the lowest resolution is used as the fallback for devices with device pixel ratios below that resolution. The entry should still be included in the pubspec.yaml manifest, however. For example, it's valid to declare `assets/image.png` as an asset even if only `assets/3x/image.png` exists on disk. This fix restores older behavior of including a main asset as a variant of itself in the manifest if it exists. This fix also includes a non-user-visible behavior change: * `"dpr"` is no longer a required field in the asset manifest's underlying structure. For the main asset entry, we do not include `"dpr"`. It makes less sense for the tool to decide what the default target dpr for an image should be. This should be left to the framework.
-
- 06 Jun, 2023 1 commit
-
-
Christopher Fujino authored
Always pass the space code point (`0x20`) to the font subsetter when targetting web because the web engine relies on that character to calculate a font's height. Fixes #127270
-
- 02 Jun, 2023 4 commits
-
-
Alexander Aprelev authored
The fix is coming as part of https://dart-review.git.corp.google.com/c/sdk/+/306908 dart sdk roll as well as https://github.com/flutter/flutter/pull/128084. BUG=https://github.com/dart-lang/sdk/issues/52522
-
Victoria Ashworth authored
Workaround solution for: https://github.com/flutter/flutter/issues/121231 See https://github.com/flutter/flutter/issues/120808#issuecomment-1551826299 Error Case 2 for more information. Sometimes the `ios-deploy` process does not return the logs from the application. We've been unable to figure out why. This is a solution to workaround that by using `idevicesyslog` alongside `ios-deploy` as a backup in getting the log for the Dart VM url. As explained in https://github.com/flutter/flutter/issues/120808#issuecomment-1551826299, when error case 2 happens, the `idevicesyslog` does successfully find the Dart VM. Also, in the comments of the code it mentions `syslog` is not written on iOS 13+, this was added in response to this issue: https://github.com/flutter/flutter/issues/41133. However, `idevicesyslog` does in fact work (at least for iOS 16), we use it to collect device logs for our CI tests already: https://github.com/flutter/flutter/blob/1dc26f80f04c1c1091a83c5fead9b3aa83483292/dev/devicelab/lib/framework/devices.dart#L998-L1006
-
Michael Goderbauer authored
Fixes https://github.com/flutter/flutter/issues/127989.
-
Zachary Anderson authored
Revert "Fix issue where DevTools would not be immediately available when using --start-paused" (#128117) Reverts flutter/flutter#126698 There are a bunch of tool crashes on CI that start with this commit. I'm not sure this PR is the cause because there is no backtrace from the tool on the crashes. The only error message is `Oops; flutter has exited unexpectedly: "Null check operator used on a null value`.
-
- 01 Jun, 2023 1 commit
-
-
Ben Konyi authored
Service extensions are unable to handle requests when the isolate they were registered on is paused. The DevTools launcher logic was waiting for some service extension invocations to complete before advertising the already active DevTools instance, but when --start-paused was provided these requests would never complete, preventing users from using DevTools to resume the paused isolate. Fixes https://github.com/flutter/flutter/issues/126691
-