1. 06 Jul, 2023 1 commit
  2. 05 Jul, 2023 2 commits
  3. 29 Jun, 2023 2 commits
  4. 27 Jun, 2023 1 commit
    • Ben Konyi's avatar
      Reland "Fix issue where DevTools would not be immediately available when using... · 5ea2be69
      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: 's avatarZachary Anderson <zanderso@users.noreply.github.com>
      5ea2be69
  5. 23 Jun, 2023 1 commit
    • David Iglesias's avatar
      [web] Hides that Flutter uses requireJS in debug. (#129032) · 34b42acf
      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
      34b42acf
  6. 22 Jun, 2023 2 commits
  7. 21 Jun, 2023 1 commit
  8. 20 Jun, 2023 3 commits
    • Victoria Ashworth's avatar
      Fix duplicate devices from xcdevice with iOS 17 (#128802) · 25e98b54
      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.
      25e98b54
    • Lau Ching Jun's avatar
      Use the new `getIsolatePauseEvent` method from VM service to check for pause event. (#128834) · 32917500
      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].*
      32917500
    • Tae Hyung Kim's avatar
      Refactor generate_localizations_test.dart (#128974) · 48ba9c41
      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.
      48ba9c41
  9. 19 Jun, 2023 1 commit
  10. 16 Jun, 2023 2 commits
  11. 15 Jun, 2023 4 commits
  12. 14 Jun, 2023 2 commits
  13. 13 Jun, 2023 1 commit
  14. 12 Jun, 2023 1 commit
  15. 09 Jun, 2023 5 commits
  16. 08 Jun, 2023 1 commit
    • Tess Strickland's avatar
      Use `--target-os` for appropriate precompiled targets. (#127567) · 840d7dd6
      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.
      840d7dd6
  17. 07 Jun, 2023 4 commits
    • chunhtai's avatar
      Adds vmservices to retrieve android applink settings (#125998) · 5328bd9a
      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.
      5328bd9a
    • Alexander Aprelev's avatar
      Roll engine, patch expression evaluation (#128255) · 09c07067
      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
      09c07067
    • Andrew Kolos's avatar
      [tools] allow explicitly specifying the JDK to use via a new config setting (#128264) · 96afa500
      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.
      96afa500
    • Andrew Kolos's avatar
      Do not try to load main/default asset image if only higher-res variants exist (#128143) · 759ebef6
      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.
      759ebef6
  18. 06 Jun, 2023 1 commit
  19. 02 Jun, 2023 4 commits
  20. 01 Jun, 2023 1 commit