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

feat!: Migrate firebase_analytics to sound null safety #5341

Merged

Conversation

IchordeDionysos
Copy link
Contributor

Description

This migrates firebase_analytics to non-nullable types

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).

@google-cla google-cla bot added the cla: yes label Mar 14, 2021
@IchordeDionysos
Copy link
Contributor Author

IchordeDionysos commented Mar 14, 2021

@Salakar any idea why the iOS build fails? 🤔

When I run the command locally on my MacBook it works:

flutter build ios --no-codesign --simulator --debug --target=./test_driver/firebase_analytics_e2e.dart --dart-define=CI=true

By the way, PR was closed by accident ;)

@untp
Copy link
Contributor

untp commented Mar 15, 2021

I want to make some changes, but I can't edit this PR, so I created a PR to your repo (simpleclub-extended#2). @IchordeDionysos Can you review and merge it? It includes analytics example migration and uses plugin_platform_interface.

@IchordeDionysos
Copy link
Contributor Author

@untp thanks for your PR incorporated what I could, unfortunately migrating the example to null-safety is not possible yet integration tests null-safety is not yet in stable.

Also, I did not want to migrate to the platform interfaces to minimize the scope of the PR. :)

@rrousselGit @Salakar @Ehesp can you review the PR? 😌

@kevmoo
Copy link
Collaborator

kevmoo commented Mar 19, 2021 via email

@sysint64
Copy link

The id argument in the FirebaseAnalytics.setUserId method should has String? type, not String.

@IchordeDionysos
Copy link
Contributor Author

@sysint64 thanks for the hint, somehow forgot to update the types in the main package...

@IchordeDionysos
Copy link
Contributor Author

@Salakar @rrousselGit how should we go forward with this PR to get null-safety for Firebase Analytics? :)

@rrousselGit rrousselGit self-assigned this Mar 23, 2021
Copy link
Contributor

@rrousselGit rrousselGit left a comment

Choose a reason for hiding this comment

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

LGTM, with some nits

Although I'd like to fix CI issues on master before merging this.

@rrousselGit
Copy link
Contributor

It appears that I do not have the permissions to commit on this PR

Could you sync the branch with master and revert the CI update?

@IchordeDionysos IchordeDionysos changed the title refactor: Migrate firebase analytics to nnbd feat!: Migrate firebase_analytics to sound null safety Mar 24, 2021
@IchordeDionysos
Copy link
Contributor Author

@rrousselGit I've made the adjustments, but for some reason, the two integration checks for Android/iOS aren't starting successfully and are stuck queueing ...

@rrousselGit
Copy link
Contributor

They can take a while to start, because there's a limit on how many checks can be performed at the same time

It appears that they properly started and failed though. I'll retry them

@rrousselGit
Copy link
Contributor

Looks like everything passed after a retry.

It's good to go then 😄

@rrousselGit rrousselGit merged commit 5f5d659 into firebase:master Mar 25, 2021
@NarHakobyan
Copy link

Hi guys, thanks for merging this 👍.

After updating to nullsafety getting error in this part, is it okay to cast it?

image

@abegehr
Copy link

abegehr commented Mar 25, 2021

I'm currently using the git-sources package with url: https://github.com/simpleclub-extended/flutterfire.git. Is there already a firebase_analytics null-safety version we can use instead? Otherwise, will this be released in a new version soon?

@IchordeDionysos
Copy link
Contributor Author

@abegehr pre-release version was just published :)

@rrousselGit what do you suggest with the Object vs dynamic thing that @NarHakobyan brought up.

In general, I try to use Object rather than dynamic. (You know the reasons :D), but in this case it might make the API less clean, as the Flutter API returns dynamic 🤔

I would revert it to the previous behavior. Do you agree?

@IchordeDionysos IchordeDionysos deleted the feature/analytics-null-safety branch March 31, 2021 20:34
@firebase firebase locked and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants