-
Notifications
You must be signed in to change notification settings - Fork 51
[unified_analytics] Initialize date formatting (package:intl requirement) #78
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
[unified_analytics] Initialize date formatting (package:intl requirement) #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The analysis server's doesn't currently invoke initializeDateFormatting
. Does that mean that it's current use of this package (without this change) is broken? If so, wee need to get this landed and pulled in to the SDK repo, and might need a cherry pick.
I'm not sure why this wasn't an issue on the Dart side because when I ran this in Flutter, I immediately got an error saying to run this function before any date parsing. I'm going to do a bit more digging to see how this works in different locales first before opening it up for merging but I agree, ultimately it should be cherry-picked in so that we're safe |
cc @mosuem wrt package:intl usage |
@bwilkerson @eliasyishak Which code works without calling |
Hi @mosuem thanks for following up! So if you look at this function in the flutter tool https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/globals.dart#L94-L105 You'll see that I have a function that will return an analytics instance, which comes from
It tells us to just call the initialization function for the datetimes and that fixes the error, but I just wanted to understand that if I called it within the package, if that will fix it for any tool using this package? |
|
Great, opening up the PR then @bwilkerson Oops forgot you already approved |
Can you pull this version into the SDK, and then create a cherry pick (using https://github.com/dart-lang/sdk/wiki/Cherry-picks-to-a-release-channel) to get this into the 3.0 branch? |
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@93ea575...755da8c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
As part of #70, initializing date formatting upstream within the package will ensure that clients using this package won't need to call it before implementing.
This package requires date formatting for the dates that are written and read from the config file that stores when each tool was onboarded to telemetry collection.