1. 19 Oct, 2023 1 commit
  2. 18 Oct, 2023 2 commits
  3. 17 Oct, 2023 2 commits
    • auto-submit[bot]'s avatar
      Reverts "Skip injecting Bonjour settings when port publication is disabled" (#136750) · 54c0a350
      auto-submit[bot] authored
      Reverts flutter/flutter#136562
      Initiated by: vashworth
      This change reverts the following previous change:
      Original Description:
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      54c0a350
    • Victoria Ashworth's avatar
      Skip injecting Bonjour settings when port publication is disabled (#136562) · 0383d8ba
      Victoria Ashworth authored
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      0383d8ba
  4. 26 Sep, 2023 1 commit
    • Victoria Ashworth's avatar
      Wait for CONFIGURATION_BUILD_DIR to update when debugging with Xcode (#135444) · 3cfe3720
      Victoria Ashworth authored
      So there appears to be a race situation between the flutter CLI and Xcode. In the CLI, we update the `CONFIGURATION_BUILD_DIR` in the Xcode build settings and then tell Xcode to install, launch, and debug the app. When Xcode installs the app, it should use the `CONFIGURATION_BUILD_DIR` to find the bundle. However, it appears that sometimes Xcode hasn't processed the change to the build settings before the install happens, which causes it to not be able to find the bundle.
      
      Fixes https://github.com/flutter/flutter/issues/135442
      
      --- 
      
      Since it's a timing issue, there's not really a consistent way to test it.
      
      I was able to confirm that it works, though, by using the following steps:
      1. Create a flutter project
      2. Open the project in Xcode
      3. `flutter clean`
      4. `flutter run --profile -v`
      
      If I saw a print line `stderr: CONFIGURATION_BUILD_DIR: build/Debug-iphoneos`, that means it first found the old and incorrect `CONFIGURATION_BUILD_DIR` before updating to the the new, so I was able to confirm that it would wait until it updated.
      3cfe3720
  5. 21 Sep, 2023 1 commit
  6. 10 Sep, 2023 1 commit
    • Daco Harkes's avatar
      Native assets support for MacOS and iOS (#130494) · aa36db1d
      Daco Harkes authored
      Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code.
      
      For more info see:
      
      * https://github.com/flutter/flutter/issues/129757
      
      ### Implementation details for MacOS and iOS.
      
      Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file).
      
      The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target.
      
      The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets.
      
      ### Example vs template
      
      The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209.
      
      ### Tests
      
      This PR adds new tests to cover the various use cases.
      
      * dev/devicelab/bin/tasks/native_assets_ios.dart
        * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode.
      * dev/devicelab/bin/tasks/native_assets_ios_simulator.dart
        * Runs an example app with native assets, doing hot reload and hot restart.
      * packages/flutter_tools/test/integration.shard/native_assets_test.dart
        * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester.
      * packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart
        * Unit tests the new Target in the backend.
      * packages/flutter_tools/test/general.shard/ios/native_assets_test.dart
      * packages/flutter_tools/test/general.shard/macos/native_assets_test.dart
        * Unit tests the native assets being packaged on a iOS/MacOS build.
      
      It also extends various existing tests:
      
      * dev/devicelab/bin/tasks/module_test_ios.dart
         * Exercises the add2app scenario.
      * packages/flutter_tools/test/general.shard/features_test.dart
         * Unit test the new feature flag.
      aa36db1d
  7. 18 Aug, 2023 1 commit
    • Mustafa Ateş Uzun's avatar
      doc: add flag params (#132485) · 6875827f
      Mustafa Ateş Uzun authored
      *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].*
      6875827f
  8. 10 Aug, 2023 1 commit
  9. 09 Aug, 2023 1 commit
    • Victoria Ashworth's avatar
      New tooling for iOS 17 physical devices (#131865) · d631b262
      Victoria Ashworth authored
      This PR includes the following changes. These changes only apply to iOS 17 physical devices.
      
      | Command | Change Description  | Changes to User Experience |
      | ------------- | ------------- | ------------- |
      | `flutter run --release` | Uses `devicectl` to install and launch application in release mode.  | No change.  |
      | `flutter run`  | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
      | `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal.  |
      | `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app.  | No change.  |
      | `flutter screenshot` | Will return error.  | Will return error.  |
      
      Other changes include:
      * Using `devicectl` to get information about the device
      * Using `idevicesyslog` and Dart VM logging for device logs
      
      Note:
      Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.
      
      Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
      d631b262
  10. 06 Jul, 2023 1 commit
  11. 07 Apr, 2023 1 commit
  12. 22 Mar, 2023 1 commit
  13. 28 Feb, 2023 1 commit
  14. 27 Feb, 2023 3 commits
  15. 17 Feb, 2023 2 commits
  16. 13 Feb, 2023 1 commit
  17. 31 Jan, 2023 1 commit
  18. 20 Jan, 2023 1 commit
  19. 19 Jan, 2023 1 commit
    • Alex Wallen's avatar
      [macos] add flavor options to commands in the `flutter_tool` (#118421) · 73096fd9
      Alex Wallen authored
      * Add new macos target configured for flavors
      
      * Rename Free App copy-Info.plist to Free App Info.plist
      
      * Remove bogus entitlements
      
      * Remove Generated.xcconfig
      
      * Audit project.pbxproj
      
      * Remove unused configs
      
      * share one info.plist
      
      * Modify scheme so that paid app works
      
      * Codesign automatic
      
      * Pipe flavor as scheme into xcodebuild
      
      * Ignore incoming flavor string
      
      * pipe flavor for flutter run to work
      
      * Add devicelab tests
      
      * Error if host and target device are same for flutter install desktop
      
      * Avoid bang (!) by promoting a local.
      Co-authored-by: 's avatarJenn Magder <magder@google.com>
      
      * Add supportsInstall property
      
      * Override  in test classes
      
      * Add install test on macOS
      
      * Refactor application_package and add tests for package directory
      Co-authored-by: 's avatara-wallen <stephenwallen@google.com>
      Co-authored-by: 's avatarJenn Magder <magder@google.com>
      73096fd9
  20. 09 Jan, 2023 1 commit
  21. 07 Nov, 2022 1 commit
  22. 17 Oct, 2022 1 commit
  23. 04 Oct, 2022 1 commit
  24. 26 Sep, 2022 1 commit
  25. 16 Sep, 2022 2 commits
  26. 13 Sep, 2022 1 commit
  27. 12 Sep, 2022 1 commit
    • Liam Appelbe's avatar
      Null safety migration of packages/flutter_tools/bin (#110706) · e3b9223a
      Liam Appelbe authored
      * Migrate packages/flutter_tools/bin
      
      * Fix NPE
      
      * Fix test
      
      * Fix test
      
      * Fix l10n optionalParameters
      
      * Fix ChromeTab nullability
      
      * Fix another type cast error
      
      * Fix another cast error
      
      * Fix another cast error (copied from #110711)
      
      * Fix NPE
      
      * Fix another NPE
      
      * Assert that testDirectory is not null
      e3b9223a
  28. 12 Aug, 2022 1 commit
  29. 30 Jul, 2022 1 commit
  30. 29 Jul, 2022 1 commit
  31. 15 Jul, 2022 1 commit
  32. 13 Jul, 2022 1 commit
    • jensjoha's avatar
      Improve coverage speed by using new caching option for package:coverage (#107395) · 803ef6a4
      jensjoha authored
      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).
      803ef6a4
  33. 02 Jun, 2022 1 commit
  34. 31 May, 2022 1 commit
    • Chris Bracken's avatar
      [tool] Migrate off deprecated coverage paramters (#104997) · 73ae3243
      Chris Bracken authored
      In https://github.com/flutter/flutter/pull/103771, we rolled
      dependencies in Flutter, which triggered an update of package:coverage
      to v1.3.1. The new version includes
      https://github.com/dart-lang/coverage/pull/370 in which two deprecations
      landed:
      
      * The `Resolver` default constructor was deprecated and replaced with
        the `Resolver.create` static factory method, which unfortunately
        happens to be async.
      * The `packagesPath` parameter to `HitMap.parseJson`, which takes the
        path to the `.packages` file of the package for which coverage is to
        be collected, was deprecated. This parameter was replaced with
        `packagePath` in https://github.com/dart-lang/coverage/pull/370 which
        was part of the overall deprecation of the .packages file in Dart
        itself https://github.com/dart-lang/sdk/issues/48272. The overall goal
        being that end-user code shouldn't need to know about implementation
        details such as whether dependency information is stored in a
        .packages file or a package_info.json file, but rather use the
        package_config package to obtain the package metadata and perform
        other functions such as resolving its dependencies to filesystem
        paths. packagesPath was replaced by packagePath, which takes the path
        to the package directory itself. Internally, package:coverage then
        uses package_config to do the rest of the package/script URI
        resolution to filesystem paths.
      
      This migrates off the deprecated `packagesPath` parameter to the
      replacement `packagePath` paramter.
      
      Issue: https://github.com/flutter/flutter/issues/103830
      73ae3243