Commit graph

155 commits

Author SHA1 Message Date
Alexandre Ardhuin 440ce8fde6
Fix indentations of statements in BlockFunctionBody (#28933)
* fix indentof statements in BlockFunctionBody

* fix indentof statements in BlockFunctionBody in tests
2019-03-07 21:09:28 +01:00
Alexandre Ardhuin 387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
liyuqian dd5559a5b8
Add LICENSE test to presubmit checks (#28369)
## Description

Also update the existing dart files with missing licenses.

Without the fix, we'll emit the following error message
```
License headers cannot be found at the beginning of the following files.

/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/lib/src/animation/tween_sequence.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/material/raw_material_button_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/async_lifecycle_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/sliver_constraints_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/app_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/test_border.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/physical_model_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/inherited_model.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/lib/src/base/user_messages.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/src/pubspec_schema.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/ios/simulators_test.dart
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

## Related Issues

Fixes https://github.com/flutter/flutter/issues/28368

## Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.

- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] My PR includes tests for *all* changed/updated/fixed behaviors (See [Test Coverage]).
- [x] All existing and new tests are passing.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] The analyzer (`flutter analyze --flutter-repo`) does not report any problems on my PR.
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I am willing to follow-up on review comments in a timely manner.

## Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

- [ ] Yes, this is a breaking change (Please read [Handling breaking changes]).
- [x] No, this is *not* a breaking change.

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Test Coverage]: https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter
[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/
[Handling breaking changes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
2019-02-26 17:38:21 -08:00
Alexandre Ardhuin 5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
KyleWong 4b4a9400b7 Refactor build-number/build-name logic. (#27743)
This PR aims at several things:

1. Use pub_semver to check a version in pubspec.yaml meets the requirements specified in https://semver.org/.
2. Don't limit build-number/build-name as a fixed format. Instead, validate it according to the target(ios/android).
3. Make sure that build-number/build-name are always validated no matter it's specified by the `flutter command` or version in pubspec.yaml.

Fixes #27589
2019-02-13 07:48:03 -08:00
KyleWong 52687c7910
Optimize flutter run logic for iOS by "ONLY_ACTIVE_ARCH=YES" if possible (#27817) 2019-02-12 12:24:57 +08:00
Dan Field 704814c67a
Use CP_REPOS_DIR if it's set (#27553)
* Allow CP_REPOS_DIR
2019-02-05 16:03:37 -08:00
KyleWong 60aa49e064 Let injectPlugins integrate custom pods (#26970) 2019-01-29 20:33:16 -08:00
Dan Field 386f3466b5
Roll engine to 05fee4eeee0ff6b219b1fcc394371e5f6963cc46 (#26713)
* move flutter_assets to App.framework

* Roll engine to 05fee4eeee0ff6b219b1fcc394371e5f6963cc46

05fee4eee Update default flutter_assets path for iOS embedding (flutter/engine#7518)
02205db01 Roll src/third_party/skia 5d052dac3ac1..02738a86e5fd (4 commits) (flutter/engine#7541)
af907c074 Roll src/third_party/skia 5c7a3ac0e214..5d052dac3ac1 (7 commits) (flutter/engine#7540)
dde286673 IWYU to get SkFontMetrics (flutter/engine#7539)
2019-01-21 21:23:04 -08:00
Ian Hickson 31a9626c48
[O] Removing all timeouts (mark II) (#26736)
These are essentially self-inflicted race conditions. Instead of timeouts we're going to try a more verbose logging mechanism that points out when things are taking a long time.
2019-01-19 00:31:05 -08:00
Dan Field 4c99958df6
Revert "Move flutter_assets to App.framework (#26630)" (#26675)
This reverts commit d8db70af1a.
2019-01-16 16:46:37 -08:00
Dan Field d8db70af1a
Move flutter_assets to App.framework (#26630)
* move flutter_assets to App.framework

* remove flutter_assets references from all pbxproj files checked in
2019-01-16 14:02:54 -08:00
KyleWong 85ded44139 Optimize cocoapods logic in flutter doctor. (#25872) 2019-01-02 19:57:03 -08:00
Ian Hickson 8426910a19
Revert "[O] Remove many timeouts. (#23531)" (#25646)
This reverts commit 76f70810e4.
2018-12-20 18:46:36 -08:00
Ian Hickson 76f70810e4
[O] Remove many timeouts. (#23531)
* Remove many timeouts.

These are essentially self-inflicted race conditions. Instead of timeouts we're going to try a more verbose logging mechanism that points out when things are taking a long time.

* Get the attach tests to pass.

* Apply review comments from Todd

* More review comment fixes

* Put back the extended timeouts here now that I know why we have them...
2018-12-20 17:10:40 -08:00
xster b17feefc9e
Remove code signing special casing for Googlers round 2 (#24580) 2018-12-19 14:41:21 -08:00
Alexandre Ardhuin 32d65fef1c
fix some formatting issues (#25474) 2018-12-18 10:05:12 +01:00
Jonah Williams f5b02e3c05
Bump minimum ios_deploy version (#24550) 2018-11-20 07:49:29 -08:00
jslavitz 5dac7a2347
Removes check for Homebrew if all necessary packages are present. (#23844)
* Removes need for homebrew installation if all other packages are installed. Modifies test to work with this new functionality.
2018-11-07 15:21:05 -08:00
mattijsf 54becbf3bf Ignore unreachable iOS devices in IOSDevice.getAttachedDevices (#23776) 2018-11-05 15:09:39 -08:00
Dan Field 212374f0b7
Fix tests for ANSI terminals (#23906) 2018-11-05 07:56:30 -08:00
Alexander Aprelev 47f62109d2
Specify UDID for idevicelistener. (#23854)
This is needed to run flutter app on multiple iOS devices at a time.
2018-11-01 20:04:42 -07:00
Dan Field fd6b2e198c
Re-reland Xcode backend refactor (#23762)
* Use Xcode build configurations to drive Flutter build mode

* Proper check wrt local_engine, print error if profile mode misisng

* Remove unused code, update tests, fix template problem, update warning

* fix up warning

* add explanatory dev comment

* fix whitespace

* missing words, change lambda arrow to function body

* error indentation

* Test early exits for xcode_backend.sh

* only on macOS, use right test

* Update error messages

* case insensitive compare for build config

* Update gallery podfile

* update projects to add profile configuration

* make compatible with flavors

* add missing plist files

* add FLUTTER_FRAMEWORK_DIR back, set swift version for profile, tell Podfile about profile
2018-10-31 16:37:53 -07:00
Dan Field 7217999a9a
Revert "Reland Xcode backend refactor" (#23737)
* Revert "Update templates (#23698)"

This reverts commit 5b0de6d679.

* Revert "Verify that date/number translations exist for all supported languages (#23692)"

This reverts commit 3449edf256.

* Revert "Reland Xcode backend refactor (#23574)"

This reverts commit 7270f2845d.
2018-10-30 09:36:31 -07:00
Dan Field 7270f2845d
Reland Xcode backend refactor (#23574)
* Use Xcode build configurations to drive Flutter build mode

* Proper check wrt local_engine, print error if profile mode misisng

* Remove unused code, update tests, fix template problem, update warning

* fix up warning

* add explanatory dev comment

* fix whitespace

* missing words, change lambda arrow to function body

* error indentation

* Test early exits for xcode_backend.sh

* only on macOS, use right test

* Update error messages

* case insensitive compare for build config

* Update gallery podfile

* update projects to add profile configuration

* make compatible with flavors

* add missing plist files
2018-10-30 07:23:19 -07:00
Dan Field 628e8ec0b9
Revert "Xcode backend refactor (#23387)" (#23528)
This reverts commit def1d80566.
2018-10-25 13:25:09 -07:00
Dan Field def1d80566
Xcode backend refactor (#23387)
* Use Xcode build configurations to drive Flutter build mode
2018-10-25 11:29:31 -07:00
Greg Spencer 081d2a7a86
Re-land text wrapping/color PR (#22831)
This attempts to re-land #22656.

There are two changes from the original:

I turned off wrapping completely when not sending output to a terminal. Previously I had defaulted to wrapping at and arbitrary 100 chars in that case, just to keep long messages from being too long, but that turns out the be a bad idea because there are tests that are relying on the specific form of the output. It's also pretty arbitrary, and mostly people sending output to a non-terminal will want unwrapped text.

I found a better way to terminate ANSI color/bold sequences, so that they can be embedded within each other without needed quite as complex a dance with removing redundant sequences.

As part of these changes, I removed the Logger.supportsColor setter so that the one source of truth for color support is in AnsiTerminal.supportsColor.

*     Turn on line wrapping again in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)

    This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).

    Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.

    Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.

    Since wrapping is now turned on, also removed many redundant '\n's in the code.
2018-10-10 18:17:56 -07:00
Greg Spencer 2d81adf74c
Revert "Turn on line wrapping in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)" (#22759)
This reverts commit e438632165
because it breaks 160 benchmarks, and several devicelab tests,
due to changing the format of the output.
2018-10-05 22:29:37 -07:00
Greg Spencer e438632165
Turn on line wrapping in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)
This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).

Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.

Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.

Since wrapping is now turned on, also removed many redundant '\n's in the code.
2018-10-05 20:00:11 -07:00
xster 6cdf953241 Revert "remove code signing special casing for Googlers (#22287)" (#22376)
This reverts commit 1eb38abdb7.
2018-09-27 14:43:54 -07:00
xster 1eb38abdb7
remove code signing special casing for Googlers (#22287) 2018-09-27 14:03:52 -07:00
Mikkel Nygaard Ravn a600fe7f13 Support materializing Flutter module host app on iOS (#21276)
* Prototype

* Fix paths to Flutter library resources

* Invoke pod install as necessary for materialized modules

* Add devicelab test for module use on iOS

* Remove debug output

* Rebase, reame materialize editable

* Add devicelab test editable iOS host app

* Removed add2app test section
2018-09-25 15:21:13 -04:00
tonyzhao1 8b5af14f24 Use grouped validator instead of categories (#21577)
This is a cleanup PR.
2018-09-19 15:42:51 -07:00
Chris Bracken f8c50ea15f
Use Xcode legacy build system for iOS builds (#21901) (#21994)
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: https://github.com/flutter/flutter/issues/20685
2018-09-18 10:05:46 -07:00
Chris Bracken 4c045e79fb
Revert "Use Xcode legacy build system for iOS builds (#21901)" (#21966)
This caused issues for projects without an Xcode workspace. Almost all
Flutter projects in the wild will have a workspace, but this patch needs
to add a check to catch any that lack one.

This reverts commit 021f472efc.
2018-09-17 18:22:54 -07:00
Chris Bracken 021f472efc
Use Xcode legacy build system for iOS builds (#21901)
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: https://github.com/flutter/flutter/issues/20685
2018-09-17 17:54:57 -07:00
Alexandre Ardhuin a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
tonyzhao1 58d98ce31e Create categories for doctor validators (#20758)
* First step in Flutter Doctor refactor. Assigns categories to all validators.

* Revert "Roll engine e54bc4ea1832..a84b210b3d26 (6 commits) (#20453)"

This reverts commit 05c2880a17.

* Split iOS and Android workflows into workflow and validator classes.

* Change ValidatorCategory to handle standalone validators that share a
category (e.g. IntelliJ).

Also make Android Studio and Android toolchain use separate categories.

At this stage, flutter doctor output matches what it was previously.
(The summary() method itself has not yet been changed )

* Change doctor summary code to support validator categories.

Output is still unchanged.

* Handle small formatting issues.

* Flip Flutter category's isGroup field to false until it's actually
needed.

* Revert auto-generated formatting changes to keep those lines from
muddying the pull.

* Small fixes pointed out by analyzer.

* Properly fix analyzer issues around const constructors.

* Small changes to address comments.

* Add tests to verify grouped validator behavior and validationtype
merging.

* Update doctor.dart

* Add comments for clarification.
2018-09-04 19:36:47 -07:00
Chris Bracken 63fde92adc
Eliminate Dart 1 support from Xcode xcconfig files (#21400) 2018-09-04 14:33:49 -07:00
Chris Bracken d04a057efd
Eliminate BuildInfo.previewDart2 (now always true) (#21392)
Dart 1 is no longer supported in Flutter.
2018-09-04 13:38:17 -07:00
Danny Tuppeny a74f591d0c
Change asset_bundle_package_font_test to memory file system (#21114)
* Change assert_bundle_package_font_test to memory file system

This is to work towards being able to run the tests without `-j1` (#21113). These tests were using the real filesystem and setting/relying on fs.currentDirectory. There was a comment about this being because the memory provider didnt' support POSIX and Windows, however that seems to have changed since (and many other asset tests already do something similar to this).

* Trim trailing whitespace

* Add a workaround for Windows path slash directions

Strictly this is correct, but the real FS can tolerate either path. The in-memory file system is more strict (see https://github.com/google/file.dart/issues/112).

* Extract a helper for writing schema files in tests

* Missed file when saving!

* Remove redundant comment

* Rename writeBasicSchema -> writeEmptySchema

* Use the file we already have to write contents

* Make comments more descriptive

* Remove another dupe of writeSchema to use the shared one

* Rename schema -> pubspec_schema

* Trim whitespace
2018-09-04 17:12:24 +01:00
Chris Bracken 041ff621a7
Eliminate --preview-dart-2 flag (#21304)
This patch eliminates the --preview-dart-2/--no-preview-dart-2 flag,
hardcoding all uses to true. It also defaults all previewDart2 method
parameters to true, where they hadn't yet been.

A series of subsequent patches will eliminate all previewDart2
parameters and the associated code from within the codebase.
2018-09-04 08:50:05 -07:00
Mikkel Nygaard Ravn 22832d3634
Support for flutter run/build module on iOS (#21216) 2018-08-30 16:18:44 +02:00
Ian Hickson 686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Mikkel Nygaard Ravn e69b434602
Fix broken Flutter module with plugins (#20496) 2018-08-13 10:35:59 +02:00
Mikkel Nygaard Ravn b280074815
Move async from member access to construction (#20035) 2018-08-02 14:12:25 +02:00
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert 00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00