Parker Lougheed
77ba015769
[tool] Fix broken comment references and code spans in doc comments ( #168498 )
...
Enables the `comment_references` and `unintended_html_in_doc_comment`
lints in `packages/flutter_tool`, then fixes each of the triggering
cases.
This PR is test exempt due to only affecting documentation comments.
## 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.
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-15 21:14:26 +00:00
Loïc Sharma
a48a1f07b8
[tool] Improve using project files in build targets ( #166211 )
...
The Flutter tool's build system executes targets that take inputs and
produces outputs. Previously, targets would hardcode paths if they
needed to use Flutter project files as inputs/outputs. For example:
```dart
class FooTarget extends Target {
@override
List<Source> get inputs => <Source>[
Source.pattern('{PROJECT_DIR}/foo/bar'),
];
}
```
This is problematic as the
[`FlutterProject`](05b5e79105/packages/flutter_tools/lib/src/project.dart (L89)
)
is the source of truth for where a Flutter project's files are located:
1. If we change a project file's location, we need to update
`FlutterProject` as well as any hardcoded target inputs/outputs.
2. Project files' location can be dynamic. For example, a Flutter app
puts iOS files in the `ios/` directory, but a Flutter module puts iOS
files in the `.ios/` directory. Targets need to duplicate
`FlutterProject`'s logic to determine the project file's location.
As a result, hardcoding project file paths in targets can be
error-prone.
This introduces a new `Source` factory that lets you use the
`FlutterProject` to create the source:
```dart
class FooTarget extends Target {
@override
List<Source> get inputs => <Source>[
Source.fromProject((FlutterProject project) => project.fooFile),
];
}
```
Part of https://github.com/flutter/flutter/issues/163874
Next pull request: https://github.com/flutter/flutter/pull/165916
## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-01 05:15:25 +00:00
Matan Lurey
71d50a1616
Start using bin/cache/engine.{stamp|realm}
instead of bin/internal/engine.{realm|version}
. ( #164352 )
...
Towards https://github.com/flutter/flutter/issues/164315 .
See also:
https://github.com/flutter/flutter/blob/master/docs/tool/Engine-artifacts.md .
There are more usages in `flutter/flutter`, but some will require more
specialized review (i.e. from release folks, or the Dart SDK team), so
I'll split those off.
~~Requires https://github.com/flutter/flutter/pull/164317 to merge
first.~~ ✅
2025-03-02 00:54:33 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework ( #160545 )
...
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Jonah Williams
db829c1e20
[flutter_tools] migrate more unit tests to null safety ( #106153 )
2022-06-17 21:34:27 -07:00
Jenn Magder
9e88fe328e
Remove globals_null_migrated.dart, move into globals.dart ( #92861 )
2021-11-01 17:18:03 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be24
.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Jenn Magder
0d79013a81
Move globals.artifacts to globals_null_migrated, update imports ( #83137 )
2021-05-21 18:35:02 -07:00
Jenn Magder
8d5f08fe02
Migrate pub in flutter_tools to null safety ( #80548 )
2021-04-16 17:23:00 -07:00
Chris Bracken
3e7e06512c
Correct misspellings throughout the codebase ( #79500 )
2021-04-01 10:04:03 -07:00
Jonah Williams
dda17485cf
[flutter_tools] remove all mock artifacts usage ( #76884 )
2021-02-26 13:28:31 -08:00
Sam Rawlins
ba58ad0385
Remove "unnecessary" imports in test/general.shard ( #75954 )
2021-02-18 13:38:24 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. ( #74832 )
...
* opt out the flutter tool
* oops EOF
* fix import
* Update tool_backend.dart
* Update daemon_client.dart
* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams
14992c5951
Revert "[flutter_tools] separate target platform, host platform, and architecutre ( #60119 )" ( #60147 )
...
This reverts commit 30d97d89e0
.
2020-06-23 17:19:29 -07:00
Jonah Williams
30d97d89e0
[flutter_tools] separate target platform, host platform, and architecutre ( #60119 )
...
separate target platform, host platform, and architecture
2020-06-23 13:51:17 -07:00
Zachary Anderson
6f0ed5e142
[flutter_tools] Restore base/platform.dart ( #56410 )
2020-05-06 08:15:39 -07:00
Jonah Williams
9e72bf565e
[flutter_tools] don't compute hashes of well known artifacts ( #53848 )
2020-04-20 12:21:20 -07:00
Jonah Williams
72343ee0e4
[flutter_tools] refactor build_system and targets to be context-free ( #53268 )
2020-03-30 12:51:04 -07:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes ( #50368 )
2020-02-11 20:58:27 +01:00
Dan Field
8b2993337a
revert #48985 ( #49572 )
2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9
[a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set ( #48985 )
2020-01-17 15:13:01 -08:00
Alexandre Ardhuin
003541499b
use isA<Xxx>() matcher ( #48482 )
2020-01-16 12:43:03 -08:00
Jonah Williams
79c286705c
[flutter_tools] Refactor Environment and FileStore to be context-free ( #48759 )
2020-01-13 19:25:35 -08:00
Jonah Williams
ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable ( #47398 )
2020-01-06 11:04:20 -08:00
Ian Hickson
449f4a6673
License update ( #45373 )
...
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Jonah Williams
58438fca3f
Provide specific field to accept depfiles in target class ( #44481 )
...
* add depfile slot to Target class
* Update source.dart
* Update source.dart
2019-11-18 14:09:40 -08:00
Jonah Williams
0f6c093d68
Remove Source.behavior, fix bug in depfile invalidation ( #43945 )
...
* remove Source.behavior, fix bug in depfile invalidation
* more cleanup of assets
* Add skip
* address comments
* Update build_system.dart
2019-11-04 16:37:43 -08:00
Jonah Williams
27105cba2f
switch dart2js build to depfile, remove Source.function ( #42977 )
2019-10-21 16:46:44 -07:00
Jonah Williams
41b87255f5
Add support for depfile dependency in assemble ( #41530 )
2019-09-30 12:17:45 -07:00
Jonah Williams
55a1ba761d
Use output dir instead of specific paths in assemble rules ( #39274 )
2019-08-27 22:52:51 -07:00
Jonah Williams
2ab469952b
Flutter assemble for macos take 2! ( #36987 )
2019-07-31 16:19:22 -07:00
Jonah Williams
188093c912
Rearrange flutter assemble implementation ( #36240 )
2019-07-25 08:50:03 -07:00