Skip to content

Conversation

@matanlurey
Copy link
Contributor

generateLocalizations should fail (flutter gen-l10n) if flutter: generate: does not exist.

The previous logic was faulty, because it was totally possible to opt-out of synthetic packages (i.e. in a l10n.yaml file), but still not be specifying flutter: generate:, which I believe is supposed to still be an error.

This came up in #160289 as flutter config --explicit-package-dependencies is enabled by default, as the error is no longer thrown. Made a few other small test forward-fixes that otherwise would break with the switch (but are expected) as well.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 12, 2025
@jonahwilliams
Copy link
Contributor

because it was totally possible to opt-out of synthetic packages (i.e. in a l10n.yaml file), but still not be specifying flutter: generate:, which I believe is supposed to still be an error.

Not sure I follow. If you opt out of synthetic package for gen-l10n, then it would generate into your source directory. Not specifying generate wouldn't be an error then?

@matanlurey
Copy link
Contributor Author

@jonahwilliams::

Not specifying generate wouldn't be an error then?

The presence of (https://docs.flutter.dev/tools/pubspec):

# pubspec.yaml
flutter:
  generate: true

... means enables generation of localized strings from arb files.

It is not directly connected to package:flutter_gen (maybe it was at inception?), in fact post migration (https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source#migration-guide) you'll still keep those lines, the difference is that synthetic-package: false becomes the default (instead of true).

@jonahwilliams
Copy link
Contributor

oh.... interesting...

@jonahwilliams
Copy link
Contributor

😓

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM?

@matanlurey
Copy link
Contributor Author

Apparently we have tests that relied on the behavior of this error never showing up 🤦🏼

@matanlurey
Copy link
Contributor Author

Updated! It was just 2 call sites, I might have slightly over-exagerrated.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 12, 2025

autosubmit label was removed for flutter/flutter/163145, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2025
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Feb 12, 2025
Merged via the queue into flutter:master with commit 1e32c00 Feb 12, 2025
151 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants