Sigurd Meldgaard
b23840d044
Only bundle assets and plugins from transitive closure of dependencies ( #160443 )
...
Fixes https://github.com/dart-lang/pub/issues/4486
Fixes https://github.com/dart-lang/pub/issues/4473
Fixes https://github.com/flutter/flutter/issues/79261
Fixes https://github.com/flutter/flutter/issues/160142
Fixes https://github.com/flutter/flutter/issues/155242
Use the new `.dart_tool/package_graph.json` file to compute the
dependency graph. Determining
* which are transitive dependencies of the main app's direct and
dev-dependencies, (not other packages from the workspace)
* which of these are only in the transitive set of the direct
dependencies
Bundles assets from dev_dependencies when running `flutter test`, but
not otherwise.
2025-05-19 15:30:58 +00:00
Sigurd Meldgaard
45b21ec3bb
Refactor writing of package config in tests ( #163734 )
...
Seems like each test had its own way of doing this.
Extracted from https://github.com/flutter/flutter/pull/160443
2025-02-28 08:51:59 +00:00
Andrew Kolos
2f2bda3504
[reland] delete FlutterCommand.usageValues
( #162550 )
...
Relands https://github.com/flutter/flutter/pull/162468
The original PR broke g3 postsubmit, because there was an override of
`FlutterCommand.usageValues`. This was since deleted.
## Original PR description
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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-02-03 20:26:04 +00:00
auto-submit[bot]
1902fb27a6
Reverts "Delete FlutterCommand.usageValues
( #162468 )" ( #162494 )
...
<!-- start_original_pr_link -->
Reverts: flutter/flutter#162468
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: tree broken (see Mac_arm64 module_test_ios)
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: andrewkolos
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {bkonyi}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-01-31 01:28:19 +00:00
Andrew Kolos
0d7f3712b4
Delete FlutterCommand.usageValues
( #162468 )
...
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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-01-30 21:05:04 +00:00
Andrew Kolos
5a3541c40c
route CLI command usage information through the logger instead of using print
( #161533 )
...
Fixes https://github.com/flutter/flutter/issues/158532
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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-01-16 21:53:58 +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
Matan Lurey
f177d8aab4
Migrate test/commands.shard
(mostly) to explicit-package-dependencies
. ( #160288 )
...
Towards https://github.com/flutter/flutter/issues/160257 .
I intentionally skipped `create_test.dart`, as that requires updating
the generated template which uses l10n, a feature changing. I'll do that
in the "big bang" PR that finally enables the feature to avoid getting
us into a bad state.
2024-12-16 22:59:16 +00:00
Alex Li
a0f2424e2e
🐛 [tool] Do not handle directory arguments implicitly for pub
commands ( #160223 )
...
- Resolves https://github.com/flutter/flutter/issues/144898
- Resolves https://github.com/flutter/flutter/issues/160145
## 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
2024-12-16 19:55:04 +00:00
Sigurd Meldgaard
2812d4685c
Stop reading .packages from flutter_tools. ( #154912 )
2024-09-13 13:53:05 +02:00
Sigurd Meldgaard
a9daf58829
Reland "Load parent package config" ( #153754 )
...
Reverts flutter/flutter#153752
Relands https://github.com/flutter/flutter/pull/150850
Now with attached g3fix
2024-08-20 15:30:46 +02:00
Sigurd Meldgaard
276674e760
Revert "Load parent package config" ( #153752 )
...
Reverts flutter/flutter#150850
Seems we need a G3Fix
2024-08-20 12:49:42 +02:00
Sigurd Meldgaard
1a2e25c2d8
Load parent package config ( #150850 )
...
Fixes #150196
2024-08-20 09:34:35 +02:00
Gray Mackall
39bdff16c1
Remove embedding v1 code in framework ( #144726 )
...
Pre work for https://github.com/flutter/engine/pull/51229 . Removes a lot of code referencing v1 of the android embedding, though not necessarily all of it (I may have missed some, it is hard to know).
Will hopefully make landing that PR less painful (or maybe painless?)
2024-03-20 20:34:14 +00:00
Loïc Sharma
472a0ab314
[Tool] Output help on 'flutter pub' ( #126211 )
...
This change makes `flutter pub` show the help usage:
```
PS > flutter pub
Commands for managing Flutter packages.
Global options:
-h, --help Print this usage information.
-v, --verbose Noisy logging, including all shell commands executed.
If used with "--help", shows hidden options. If used with "flutter
doctor", shows additional diagnostic information. (Use "-vv" to force
verbose logging in those cases.)
-d, --device-id Target device id or name (prefixes allowed).
--version Reports the version of this tool.
--suppress-analytics Suppress analytics reporting for the current CLI invocation.
--disable-telemetry Disable telemetry reporting when this command runs.
Usage: flutter pub <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
add Add a dependency to pubspec.yaml.
cache Work with the Pub system cache.
deps Print package dependencies.
downgrade Downgrade packages in a Flutter project.
get Get the current package's dependencies.
global Work with Pub global packages.
login Log into pub.dev.
logout Log out of pub.dev.
outdated Analyze dependencies to find which ones can be upgraded.
pub Pass the remaining arguments to Dart's "pub" tool.
publish Publish the current package to pub.dartlang.org.
remove Removes a dependency from the current package.
run Run an executable from a package.
test Run the "test" package.
token Manage authentication tokens for hosted pub repositories.
upgrade Upgrade the current package's dependencies to latest versions.
uploader Manage uploaders for a package on pub.dev.
version Print Pub version.
Run "flutter help" to see global options.
```
Previously it showed an error message:
```
PS > flutter pub
Missing subcommand for "flutter pub".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
```
Addresses https://github.com/flutter/flutter/issues/110025
2023-05-08 17:22:10 +00:00