- 18 Aug, 2023 2 commits
-
-
Tae Hyung Kim authored
Currently, flutter pub get generates localizations if there exists an l10n.yaml file where synthetic-package is not false. However, for any user who needs to turn off synthetic-package, their localizations are not generated. This PR should make the behavior more consistent. (Also it seems good to make it so that running flutter pub get once resolves all the dependencies so that people can get to work without running flutter gen-l10n manually.) Fixes https://github.com/flutter/flutter/issues/84979.
-
Navaron Bracke authored
This PR adjusts the quoting of the project description not not apply twice in the index.html / manifest.json of web builds. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/131834 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 14 Aug, 2023 2 commits
-
-
Jonah Williams authored
At some point in the near future, we'll start an Impeller on Android preivew - and later make it the default. Unlike Skia, Impeller does not have a fallback software rendering mode. We'd like to stop suggesting this as an option now, and in the future remove the option to force software rendering. Once impeller is the default, asking for software rendering on Android will result in either an error or falling back to Skia.
-
Polina Cherkasova authored
-
- 10 Aug, 2023 2 commits
-
-
Christopher Fujino authored
Fixes: https://github.com/flutter/flutter/issues/124970 Part of https://github.com/flutter/flutter/issues/47161 Before this change, there were two places we overrode the `Artifacts` in a Zone: 1. if/when we parse local-engine CLI options: https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart#L281 2. an additional override for fuchsia platform dill (no longer used, deleted in this PR): https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/commands/attach.dart#L274 Note 1 above creates a new instance of `Artifacts.getLocalEngine()`. In this flow, there exist two instances of `Artifacts`: 1. The default fallback instance of `CachedArtifacts` (which gets all artifacts from flutter/bin/cache), instantiated in context_runner.dart: https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/context_runner.dart#L137 2. An instance of `CachedLocalEngineArtifacts` created in the command runner once the CLI options have been parsed: https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart#L281 The regression happened when we direct injected the Artifacts 1 from above BEFORE we parsed the local-engine flag, and then used this in the second zone override, and then when creating the `FlutterDevice` there are multiple calls to `globals.artifacts` returned it when it should have returned Artifacts 2: https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/resident_runner.dart#L80 Device.artifactOverrides was originally introduced in https://github.com/flutter/flutter/pull/32071, but is no longer used, so I deleted it. I also removed direct injection of `Artifacts` to the attach sub-command, because that class now no longer references artifacts. I believe the ideal true fix for this would be to: 1. Migrate all leaf calls to `globals.artifacts` to use direct injection (in this case, the offending invocations were in [`FlutterDevice.create()`](https://github.com/flutter/flutter/blob/1cf3907407cbc91be7cec2c38b348a2d66041dd5/packages/flutter_tools/lib/src/resident_runner.dart#L80-L218), but I'm not sure that something else would not have broken later) 2. Ensure we are always direct injecting the desired instance of `Artifacts`--that is, if the user desires local engine artifacts, that we are passing an instance of `CachedLocalEngineArtifacts`. a. Alternatively, and probably simpler, teach `CachedArtifacts` to know about the local engine. This would mean parsing the global CLI options BEFORE we ever construct any instance of `Artifacts`. As an overall recommendation for implementing https://github.com/flutter/flutter/issues/47161, in the overall tree of tool function calls, we should probably migrate the leaves first (that is, migrate the sub-commands last). We should also audit and reconsider any usage of `runZoned()` or `context.run()` for the purpose overriding zoneValues.
-
Polina Cherkasova authored
-
- 02 Aug, 2023 1 commit
-
- 28 Jul, 2023 1 commit
-
-
Ian Hickson authored
Fixes https://github.com/flutter/flutter/issues/6538
-
- 24 Jul, 2023 1 commit
-
-
Christopher Fujino authored
Part of https://github.com/flutter/flutter/issues/47161
-
- 21 Jul, 2023 1 commit
-
-
Valentin Vignal authored
Fixes https://github.com/flutter/flutter/issues/109775 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 18 Jul, 2023 1 commit
-
-
Tae Hyung Kim authored
To preserve backward compatibility with the old parser which would ignore syntax errors, this PR introduces a way to treat the special characters `{` and `}` in the following way: 1. If we encounter a `{` which searching for a string token and this `{` is not followed by a valid placeholder, then we treat the `{` as a string and continue lexing for strings. 2. If we encounter a `}` while not within some expression (i.e. placeholders, arguments, plurals, or selects), then we treat the `}` as a string and continue lexing for strings. This makes it so that ``` "helloWorld": "{ } { placeholder }", "@@helloWorld": { "placeholders": { "placeholder" {} } } ``` treats the `{ }` as a string while `{ placeholder } ` is treated as a placeholder. Fixes https://github.com/flutter/flutter/issues/122404.
-
- 17 Jul, 2023 2 commits
-
-
hellohuanlin authored
The display name will fallback to CFBundleName if CFBundleDisplayName is absent. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/120553 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
Pavel Mazhnik authored
PR provides a new option to the `test` command to include coverage info of specified packages. It helps collecting coverage info in test setups where test code lives in separate packages or for multi-package projects. At present, only current package is included to the final report. Usage: Consider an app with two packages: `app`, `common`. Some of the tests in `app` use (indirectly) code that is located in `common`. When running with `--coverage` flag, that code is not included in the coverage report by default. To include `common` package in report, we can run: ```sh flutter test --coverage --coverage-package app --coverage-package common ``` Note that `--coverage-package` accepts regular expression. Fixes https://github.com/flutter/flutter/issues/79661 Fixes https://github.com/flutter/flutter/issues/101486 Fixes https://github.com/flutter/flutter/issues/93619
-
- 13 Jul, 2023 1 commit
-
-
Matan Lurey authored
Closes https://github.com/flutter/flutter/issues/80013. **Before**: ``` $ flutter create test1 --description "a: b" Creating project test1... Error detected in pubspec.yaml: Error on line 2, column 15: Mapping values are not allowed here. Did you miss a colon earlier? â· 2 â description: a: b â ^ âµ Please correct the pubspec.yaml file at /Users/matan/Developer/scratch/test1/pubspec.yaml ``` **After**: ``` $ flutter create test1 --description "a: b" Creating project test1... Resolving dependencies in test1... Got dependencies in test1. Wrote 129 files. All done! You can find general documentation for Flutter at: https://docs.flutter.dev/ Detailed API documentation is available at: https://api.flutter.dev/ If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev In order to run your application, type: $ cd test1 $ flutter run Your application code is in test1/lib/main.dart. ``` --- It's worth noting that this _always_ escapes a non-empty project description, which means that descriptions that were not previously wrapped in `"`s' will be. I'm not sure how worth it is to do a _conditional_ escape (i.e. only escape if not escaping would cause a problem), but willing to change. Side-note: I had no idea where to list this test in the (very large) `create_test.dart`, so I did my best :)
-
- 10 Jul, 2023 1 commit
-
-
Tae Hyung Kim authored
This PR fixes ignoring when random positional arguments added to the `flutter gen-l10n`. So we are no longer able to call `flutter gen-l10n hello world` or `flutter gen-l10n --format false`. Fixes https://github.com/flutter/flutter/issues/118203
-
- 22 Jun, 2023 2 commits
-
-
Christopher Fujino authored
On the current stable branch (3.10.x), `flutter format` no longer works, and gives an error. This change just deletes the code. Fixes https://github.com/flutter/flutter/issues/115809
-
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
-
- 16 Jun, 2023 1 commit
-
-
- 15 Jun, 2023 2 commits
-
-
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 1 commit
-
-
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
-
-
- 09 Jun, 2023 3 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.
-
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 `///`).
-
-
- 07 Jun, 2023 1 commit
-
-
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.
-
- 02 Jun, 2023 2 commits
-
-
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.
-
- 31 May, 2023 1 commit
-
-
Tae Hyung Kim authored
-
- 26 May, 2023 1 commit
-
-
Phil Quitslund authored
The newly updated lint will soon flag for-each in collections. See discussion: https://github.com/dart-lang/linter/pull/4383 /cc @goderbauer
-
- 23 May, 2023 1 commit
-
-
Ian Hickson authored
Give channel descriptions in `flutter channel`, use branch instead of upstream for channel name (#126936) ## How we determine the channel name Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time. I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird. This PR changes the logic to uses the current branch as the channel name. ## How we display channels The main reason this PR exists is to add channel descriptions to the `flutter channel` list: ``` ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel Flutter channels: master (tip of tree, for contributors) main (tip of tree, follows master channel) beta (updated monthly, recommended for experienced users) stable (updated quarterly, for new users and for production app releases) * foo_bar Currently not on an official channel. ianh@burmese:~/dev/flutter/packages/flutter_tools$ ``` ## Other changes I made a few other changes while I was at it: * If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on. * I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`. * I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context. * Simplified some of the code. * Made some of the tests more strict (checking all output rather than just some aspects of it). * Changed the MockFlutterVersion to implement the FlutterVersion API more strictly. * I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy). * Tweaked the help text for the `downgrade` command to be clearer. * Removed some misleading text in some error messages. * Made the `.metadata` generator consistent with the template file. * Removed some obsolete code to do with the `dev` branch. ## Reviewer notes I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
-
- 22 May, 2023 1 commit
-
-
Ian Hickson authored
Similar to https://github.com/flutter/flutter/pull/126972 but for master upgrades. Co-authored-by:
Tim Sneath <timsneath@google.com>
-
- 20 May, 2023 1 commit
-
-
Andrew Kolos authored
Relands #126086, which was reverted by #126569.
-
- 19 May, 2023 1 commit
-
-
Christopher Fujino authored
[flutter_tools] only try to take a screenshot from flutter drive if the --screenshot flag is passed (#127150) Fixes https://github.com/flutter/flutter/issues/123621
-
- 17 May, 2023 1 commit
-
-
Christopher Fujino authored
camera_android was pinned because of https://github.com/flutter/flutter/issues/126710, which was fixed upstream in release 0.10.8+1.
-
- 16 May, 2023 2 commits
-
-
Michael Goderbauer authored
-
- 15 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 11 May, 2023 2 commits
-
-
Andrew Kolos authored
Reverts flutter/flutter#126086. This PR changed the interfaces of some classes, namely `AndroidSdk`, and deleted a global. These classes had custom overrides in g3 that were not updated with a g3fix, so this PR has broken tests. See https://b.corp.google.com/issues/281945232 (non-public link)
-
Andrew Kolos authored
This is the first step in unifying Java-finding logic across the tool. If curious, see #126029 for an example of what all the changes will probably entail. Moves java-related functionality like `AndroidSdk.findJavaHome` to a new class, `Java`. See tracking issue https://github.com/flutter/flutter/issues/126126 for more.
-