Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Upgrade intl constraint, from ^0.18.0 to ^0.19.0 #567

Merged
merged 1 commit into from Mar 21, 2024

Conversation

chrisbobbe
Copy link
Collaborator

@chrisbobbe chrisbobbe commented Mar 18, 2024

No potentially breaking changes identified in the changelog:
https://github.com/dart-lang/i18n/blob/main/pkgs/intl/CHANGELOG.md#0190

This addresses the following error:

Note: intl is pinned to version 0.19.0 by flutter_localizations
from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because zulip depends on flutter_localizations from sdk which
depends on intl 0.19.0, intl 0.19.0 is required.
So, because zulip depends on intl ^0.18.0, version solving failed.

You can try the following suggestion to make the pubspec resolve:

  • Try upgrading your constraint on intl: flutter pub add intl:^0.19.0

Fixes: #575

@chrisbobbe chrisbobbe requested a review from gnprice March 18, 2024 22:49
@gnprice
Copy link
Member

gnprice commented Mar 19, 2024

Thanks!

Let's follow this, as another commit in the same PR, accompany this, squashed into the same commit, with bumping the minimum Flutter version in pubspec.yaml. As is, this change fixes things when you have a new Flutter version, but breaks them if you have an older Flutter version:

$ tools/check 
Running analyze...
Resolving dependencies... 
Note: intl is pinned to version 0.18.1 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because zulip depends on flutter_localizations from sdk which depends on intl
  0.18.1, intl 0.18.1 is required.
So, because zulip depends on intl ^0.19.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.18.1
Running test...
Resolving dependencies... 
Note: intl is pinned to version 0.18.1 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because zulip depends on flutter_localizations from sdk which depends on intl
  0.18.1, intl 0.18.1 is required.
So, because zulip depends on intl ^0.19.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.18.1
Running build_runner...
Running drift...
Running icons...

FAILED: analyze test

To rerun the suites that failed, run:
  $ tools/check analyze test

Fundamentally the root issue here is #15 — we should at some point get around to pinning the Flutter version, and then this sort of thing would just be another version constraint we update at the same time as updating that pin. But pending that, when we make a change that causes things to stop working on an older Flutter version, we should reflect that in the Flutter version constraint we do express.

In particular I think it'd be good to maintain an invariant that if you take the Flutter version lower bound in the pubspec, and you do interpret it as a pin of an exact version, then things work. (Hence squashing this change with the Flutter version bump.) That way there's always a straightforward, unambiguous way to get a working setup — and what's missing (for #15) is just the automation to update to that exact version.

@gnprice
Copy link
Member

gnprice commented Mar 20, 2024

(I also just filed #575 for the issue this fixes; so please add a "fixes" line for that in the commit message.)

@chrisbobbe
Copy link
Collaborator Author

Thanks for the review! Revision pushed, and did a quick manual smoke test on my iPhone. I saw in particular that the send button on the compose box looks right.

@gnprice
Copy link
Member

gnprice commented Mar 21, 2024

Thanks for taking care of this!

The changes all LGTM. I'd like the commit message to foreground the Flutter version bump more; I'll revise that and merge.

Recent Flutter versions from main pin a newer version of package:intl,
making them incompatible with our current pubspec constraints
and causing CI to fail (zulip#575).  So we need to upgrade `intl`.

That in turn would break things on older Flutter, so we bump the
minimum Flutter version at the same time.  This also conveniently
ensures that we have flutter/flutter@01fc13d9f, a nice upstream
improvement from our contributor VatsalBhesaniya.

The Flutter bump comes with a small tweak to respond to an
API deprecation.

The `intl` changelog identifies no potentially breaking changes:
  https://github.com/dart-lang/i18n/blob/main/pkgs/intl/CHANGELOG.md#0190

Fixes: zulip#575
@gnprice gnprice merged commit 9044a9a into zulip:main Mar 21, 2024
@chrisbobbe chrisbobbe deleted the pr-intl-19 branch March 21, 2024 21:13
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.

Build broken because latest Flutter needs new intl
2 participants