Jesse
9689f7f89c
Refactor framework + test harness tests ( #146213 )
...
Refactor the framework + test harness test suites in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing tests
The refactor of both suites included in this PR because they both depended on util functions and variables that also needed to be refactored.
Part of https://github.com/flutter/flutter/issues/145482
2024-04-23 19:29:04 +00:00
Pierre-Louis
4deff2dd9c
Update link branches to main
(continued) ( #146985 )
...
I generalized the analysis to match all `googlesource.com` repos. I also
added a test and fixed more cases.
Part of https://github.com/flutter/flutter/issues/121564
## 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.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-19 10:46:24 +02:00
Victoria Ashworth
6d19fa3bfa
Add Swift Package Manager as new opt-in feature for iOS and macOS ( #146256 )
...
This PR adds initial support for Swift Package Manager (SPM). Users must opt in. Only compatible with Xcode 15+.
Fixes https://github.com/flutter/flutter/issues/146369 .
## Included Features
This PR includes the following features:
* Enabling SPM via config
`flutter config --enable-swift-package-manager`
* Disabling SPM via config (will disable for all projects)
`flutter config --no-enable-swift-package-manager`
* Disabling SPM via pubspec.yaml (will disable for the specific project)
```
flutter:
disable-swift-package-manager: true
```
* Migrating existing apps to add SPM integration if using a Flutter plugin with a Package.swift
* Generates a Swift Package (named `FlutterGeneratedPluginSwiftPackage`) that handles Flutter SPM-compatible plugin dependencies. Generated package is added to the Xcode project.
* Error parsing of common errors that may occur due to using CocoaPods and Swift Package Manager together
* Tool will print warnings when using all Swift Package plugins and encourage you to remove CocoaPods
This PR also converts `integration_test` and `integration_test_macos` plugins to be both Swift Packages and CocoaPod Pods.
## How it Works
The Flutter CLI will generate a Swift Package called `FlutterGeneratedPluginSwiftPackage`, which will have local dependencies on all Swift Package compatible Flutter plugins.
The `FlutterGeneratedPluginSwiftPackage` package will be added to the Xcode project via altering of the `project.pbxproj`.
In addition, a "Pre-action" script will be added via altering of the `Runner.xcscheme`. This script will invoke the flutter tool to copy the Flutter/FlutterMacOS framework to the `BUILT_PRODUCTS_DIR` directory before the build starts. This is needed because plugins need to be linked to the Flutter framework and fortunately Swift Package Manager automatically uses `BUILT_PRODUCTS_DIR` as a framework search path.
CocoaPods will continue to run and be used to support non-Swift Package compatible Flutter plugins.
## Not Included Features
It does not include the following (will be added in future PRs):
* Create plugin template
* Create app template
* Add-to-App integration
2024-04-18 21:12:36 +00:00
Pierre-Louis
4a65a76279
Reland: Update link branches to main
( #146882 )
...
Reland https://github.com/flutter/flutter/pull/146558 , reverted in https://github.com/flutter/flutter/pull/146880 due to an outdated test result
## Original description
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links
Tested links manually and fixes a few broken or deprecated links
Added a test that validates that `master` isn't used, except for specified repos.
Part of https://github.com/flutter/flutter/issues/121564
2024-04-17 13:16:33 +00:00
Pierre-Louis
33a9643b5d
Revert "Update link branches to main
" ( #146880 )
...
Reverts flutter/flutter#146558
Causes failure
2024-04-17 13:25:18 +02:00
Pierre-Louis
072b8874a0
Update link branches to main
( #146558 )
...
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links
Tested links manually and fixes a few broken or deprecated links
Added a test that validates that `master` isn't used, except for
specified repos.
Part of https://github.com/flutter/flutter/issues/121564
## 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.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-17 09:44:23 +02:00
Taha Tesser
9436b3c1c8
Fix out of sync templates files and add a check ( #145747 )
...
### Description
- Add a check to verify template code in the Material library is synced with `gen_defaults`
- Sync the changes to pass the new check.
2024-04-11 13:40:36 +00:00
Gray Mackall
29ed214e7f
Set up Kotlin linting step in ci with ktlint ( #143478 )
...
Adds a kotlin linting step to the linux analyze check, using a version of [ktlint](https://github.com/pinterest/ktlint ) hosted on [CIPD](https://chrome-infra-packages.appspot.com/p/flutter/ktlint/linux-amd64/+/version_1_1_1 ).
Configured to disallow trailing commas, because of (and now acting as a test for) https://github.com/flutter/flutter/pull/145718 . Because of this configuration the PR also removes some trailing commas in some kotlin files.
Also checks in a baseline file.
2024-04-03 21:21:00 +00:00
LongCatIsLooong
d755bc222b
Replace RenderBox.compute*
with RenderBox.get*
and add @visibleForOverriding
( #145503 )
...
`@visibleForOverriding` + `@protected` unfortunately does not catch the case where a `compute*` method was overridden in a subtype and the overide was called in that same type's implementation.
I did not add a `flutter_ignore` for this because it doesn't seem there will be false positives.
2024-03-22 02:44:55 +00:00
Christopher Fujino
2dd06d10c9
[flutter_tools] add custom tool analysis to analyze.dart, lint Future.catchError ( #140122 )
...
Ensure tool code does not use Future.catchError or Future.onError, because it is not statically safe: https://github.com/dart-lang/sdk/issues/51248 .
This was proposed upstream in dart-lang/linter in https://github.com/dart-lang/linter/issues/4071 and https://github.com/dart-lang/linter/pull/4068 , but not accepted.
2024-03-07 18:10:07 +00:00
LongCatIsLooong
f2c6f03ca3
Catch Stopwatch
with static analysis ( #140019 )
...
I did not include the `'// flutter_ignore_for_file: stopwatch (see analyze.dart)'` directive since it's currently not used, and adding that shouldn't be too difficult.
2023-12-14 00:31:49 +00:00
LongCatIsLooong
aa609127e7
Use dart analyze package for num.clamp
( #139867 )
...
Extacted from #130101 , dropped the `@_debugAssert` stuff from that PR so it's easier to review.
2023-12-11 20:25:26 +00:00
Kate Lovett
133711ba9a
Analyze against using Stopwatches in the framework ( #138507 )
2023-11-29 08:49:35 -06:00
Ian Hickson
d6bf1447f4
Update the tool to know about all our new platforms ( #132423 )
...
...and add a test so we remember to keep it in sync.
2023-08-24 21:54:59 +00:00
Greg Spencer
8b768de18f
Add lint check to make sure samples are linked and have tests ( #130523 )
...
## Description
This adds a checker that will check all of the API docs examples to make sure that they are linked from at least one source file in the packages.
It also checks to make sure that all of the examples have an associated test. Since there are a large number that don't have tests at the moment, there is also a large exception list that can be burned down (burn down list is in https://github.com/flutter/flutter/issues/130459 ).
Because there are missing links currently, this PR will only pass after https://github.com/flutter/flutter/pull/130521 is merged.
## Related Issues
- https://github.com/flutter/flutter/issues/129956
- https://github.com/flutter/flutter/issues/130459
## Tests
- Added test for the checker.
2023-07-18 15:26:09 +00:00
LongCatIsLooong
d4733a3fd4
Reduce _DoubleClampVisitor
false positives ( #128539 )
...
I'm getting a few false positives in https://github.com/flutter/flutter/pull/128522/checks from the `num.clamp` checker since I introduced a class with a `clamp` method.
2023-06-08 22:42:35 +00:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements ( #126320 )
2023-05-15 11:07:30 +02:00
Ian Hickson
806c1f8186
Deprecate these old APIs ( #116793 )
...
Deprecate these old APIs
2023-04-06 19:53:50 +00:00
Danny Tuppeny
d163620f1f
Prevent bots/analyze.dart crashing on circular dependencies ( #123802 )
...
Prevent bots/analyze.dart crashing on circular dependencies
2023-03-30 21:01:06 +00:00
Michael Goderbauer
42f61b32c5
Check cc files ( #123704 )
...
Check cc files
2023-03-29 18:40:58 +00:00
Ian Hickson
db5711bfad
remove obsolete todo in doubleClamp lint ( #122745 )
...
remove obsolete todo in doubleClamp lint
2023-03-17 20:55:51 +00:00
Nabeel Parkar
e5a382ec92
Migrate activation issue template to Github form issues ( #119916 )
...
Migrate activation issue template to Github form issues
2023-02-28 08:08:01 +00:00
Lioness100
26b6c1bedd
Fix typos ( #121171 )
...
* Fix typos
* lowercase animated & opacity
* Undo typo fix
---------
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00:00
Ian Hickson
6205c110d6
Remove "note that" in our documentation (as per style guide) ( #120842 )
...
* lerp documentation
* Remove Note, Note That from repo
* Improve BorderSide documentation.
* apply review comments
2023-02-17 22:27:33 +00:00
Greg Price
98b3e48ed4
Fix hang on successful dev/bots/analyze.dart ( #117660 )
...
Fixes #117659
It turns out this was due to the output-suppression timer introduced
recently as part of cleaning up the output (#109206 ); on success, the
script would wait 10 minutes for the timeout to expire. This didn't
affect CI because this feature doesn't apply in CI (as detected by
lack of color on stdout.)
Fix the issue by cleaning up the timer on success in the same way
as on failure.
While here, clean up the final summary messages slightly,
and also cut the trailing space that printProgress was leaving
on each line.
2023-02-08 00:04:23 +00:00
Ian Hickson
4c99da6c56
Avoid printing blank lines between "Another exception was thrown:" messages. ( #119587 )
2023-02-01 23:57:54 +00:00
yaakovschectman
455e6aca50
Test integration test apps' runner files against current template app ( #118646 )
...
* Create template file test
* Add to .ci.yaml
* Add to TESTOWNERS
* Organize test script
* Push license to top of file
* Equals sign
* Utilize path.join
* Expand error message
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
* Fix missing newline string
* Move template file test to analyze.dart
* Fix newline
* Var name
* Fix extension length
* Use ignore-list for filenames
* Update dev/bots/analyze.dart
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
* Indentation
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-01-24 17:00:22 -05:00
Michael Goderbauer
c757df3bfa
Remove unnecessary null checks in dev/bots ( #118846 )
2023-01-21 01:39:19 +00:00
Ian Hickson
9fdb64b7e7
Taboo the word "simply" from our API documentation. ( #116061 )
2022-12-11 22:43:22 +00:00
Zachary Anderson
a84e369bd2
Revert "Allow Flutter golden file tests to be flaky ( #114450 )" ( #114902 )
...
This reverts commit 53e6876226
.
2022-11-08 09:26:55 -08:00
Kate Lovett
53e6876226
Allow Flutter golden file tests to be flaky ( #114450 )
...
* allow marking a golden check as flaky
* add matchesFlutterGolden to analyze.dart; no tags for flutter_goldens/lib
* Pause
* ++
* ++
* Analyzer therapy
* Once more with feeling
* Nits
* Review feedback
* Silly oops
* Test progress
* More tests
* Finish
* Nits
* Analyzer
* Review feedback
Co-authored-by: Yegor Jbanov <yjbanov@google.com>
2022-11-08 01:14:03 +00:00
Viren Khatri
e2ab3e581e
fixed inconsistent file names for *_chip.dart files and added a test ( #111364 )
2022-09-17 03:17:06 +00:00
Ian Hickson
97901da149
Cleaner test.dart output. ( #109206 )
2022-08-14 08:53:54 +00:00
Ian Hickson
7ded3d91da
API documentation cleanup ( #108500 )
2022-08-10 22:03:20 +00:00
Ian Hickson
03aa059c3c
Do not abort at first error when tests fail. ( #108936 )
2022-08-05 16:18:54 -07:00
Michael Goderbauer
10a7c9ba22
Unify analysis options ( #108462 )
2022-07-28 09:07:49 -07:00
Greg Spencer
07de84f014
Add StarBorder and StarBorder.polygon, with example. ( #108489 )
2022-07-28 00:01:05 +00:00
Michael Goderbauer
8a7b35933c
flutter update-packages --force-upgrade + analyzer fix ( #108198 )
2022-07-25 10:10:31 -07:00
Alexandre Ardhuin
93a74ca9f2
remove unused members in executable libs ( #107464 )
2022-07-12 21:41:08 +00:00
stuartmorgan
6c6ae06381
Add Windows to the platform_channels example ( #106754 )
2022-06-30 14:54:07 +00:00
Christopher Fujino
aac5e95ae5
[flutter_tools] refactor packages_autoroller.dart script ( #106580 )
2022-06-27 14:09:10 -07:00
Christopher Fujino
a30012b275
Add update packages roller ( #100982 )
2022-06-22 17:04:07 -07:00
Darren Austin
d9be807192
Updated the analyze.dart deprecation check to only look for beta branch versions. ( #105290 )
2022-06-06 21:16:49 -07:00
gaaclarke
64a0c19652
switched to a double variant of clamp to avoid boxing ( #103559 )
2022-05-18 13:26:08 -07:00
Chris Bracken
110c0a7f80
[ci] Add pointer to template image assets wiki ( #103787 )
...
Many of our flutter_tools templates include image assets such as
application icons. Adding these will trigger an analysis error from our
CI tooling.
This adds a pointer to the wiki describing the procedure for adding or
updating image assets in the templates:
https://github.com/flutter/flutter/wiki/Managing-template-image-assets
Uncovered while working on https://github.com/flutter/flutter/issues/103371
2022-05-14 10:28:59 -07:00
Michael Goderbauer
8bec125aaf
Avoid analyzing API example code twice, clean-up ( #103548 )
2022-05-11 21:27:45 -07:00
Greg Spencer
6504f2896c
Adds menuBarMenuLabel
, and removes unneeded key localizations ( #102100 )
...
When I added localizations for shortcut keys, I added some that actually can't be shortcut keys, so I'm removing them again. These are mostly Japanese-specific keys that don't even appear on modern keyboards for the most part.
Also, added menuBarMenuLabel for an accessibility label for menu bar menus.
I modified the code for the localization generation scripts to add a --remove-undefined flag that will remove any localizations that don't appear in the canonical locale.
2022-05-09 09:25:52 -07:00
Zachary Anderson
577919dbfe
Don't hardcode ink sparkle spir-v ( #102674 )
2022-05-04 09:28:45 -07:00
Phil Quitslund
80849adee1
[dev, bots, examples] rename local functions with _
s ( #102703 )
2022-04-28 10:44:06 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals ( #102585 )
2022-04-27 09:15:35 +02:00