Skip to content

Conversation

@rajveermalviya
Copy link
Member

@rajveermalviya rajveermalviya commented Nov 11, 2024

deps: Upgrade Flutter to 3.27.0-1.0.pre.443

And update Flutter's supporting libraries to match.


deps: Update CocoaPods to 1.16.2

Changelog:
https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md#1162-2024-10-31

Upstream changed the recommended CocoaPods version to 1.16.2 in:
flutter/flutter@dff1916

Without this change flutter run generates the following warnings:

Warning: CocoaPods recommended version 1.16.2 or greater not installed.
Pods handling may fail on some projects involving plugins.
To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

intl: Migrate off of synthetic package; check-in generated files

flutter tool deprecated the package:flutter_gen synthetic package:
https://flutter.dev/to/flutter-gen-deprecation

So, instead migrate to referencing source files directly.

Without this change, flutter run generates the following warning:

Synthetic package output (package:flutter_gen) is deprecated: https://flutter.dev/to/flutter-gen-deprecation. In a future release, synthetic-package will default to `false` and will later be removed entirely.

And update Flutter's supporting libraries to match.
Changelog:
  https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md#1162-2024-10-31

Upstream changed the recommended CocoaPods version to 1.16.2 in:
  flutter/flutter@dff1916

Without this change `flutter run` generates the following warnings:

  Warning: CocoaPods recommended version 1.16.2 or greater not installed.
  Pods handling may fail on some projects involving plugins.
  To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Great!

If I understand correctly, the "migrate off synthetic package" commit fixes an issue I run into pretty often, where flutter_gen gets removed from .dart_tool/package_config.json which causes analysis failures everywhere we use localization, and I have to fix by running flutter pub get.

We have a chunk of code in tools/check to work around that issue:

    # The `flutter pub run` disrupts `.dart_tool/package_config.json`,
    # removing `flutter_gen`, which causes analysis failures everywhere
    # that we use localization.  (And `dart run` has the same problem.)
    # Fix it back, with `flutter pub get`.
    # TODO(upstream): Find or file a bug for this `pub run` vs. `flutter_gen` issue.
    if [ -n "${opt_verbose}" ]; then
        flutter pub get \
        || return
    else
        flutter pub get \
            >/dev/null \
        || return
    fi

And IIUC we can just delete that code now. 🎉.

git grep flutter_gen also finds an instruction in docs/translation.md that should be updated.

l10n.yaml Outdated

synthetic-package: false
arb-dir: assets/l10n
output-dir: lib/generated/l10n
Copy link
Member

Choose a reason for hiding this comment

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

Neat! Glad to see this fixed.

In addition to the points Chris mentioned above, let's add this directory to .gitattributes so that git log -p and so on don't become noisy; see the handling there of other generated files.

@gnprice
Copy link
Member

gnprice commented Nov 12, 2024

Merging the first two commits now, to have the Flutter upgrade in when I make a new beta release shortly.

@rajveermalviya please go ahead and send the last commit:
6a49502 intl: Migrate off of synthetic package; check-in generated files

as a follow-up PR, after handling the comments above. Thanks again!

@gnprice gnprice merged commit 11e90a0 into zulip:main Nov 12, 2024
@gnprice
Copy link
Member

gnprice commented Nov 13, 2024

(This means we'll have that warning appear on flutter run for the moment:

Synthetic package output (package:flutter_gen) is deprecated:
https://flutter.dev/to/flutter-gen-deprecation. In a future release, synthetic-package will default
to `false` and will later be removed entirely.

but that's tolerable, and we'll take care of it soon.)

@rajveermalviya rajveermalviya deleted the pr-update-flutter branch November 13, 2024 06:01
@rajveermalviya
Copy link
Member Author

send the last commit … as a follow-up PR

@gnprice Sent #1058.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants