Sentry-dart: Add support to null safety

Created on 16 Dec 2020  路  24Comments  路  Source: getsentry/sentry-dart

Flutter is gearing up towards null-safety.

This issue is to track progress adding support to it.

  • [X] Support on sentry #298
  • [X] Support on sentry_flutter #337
  • [ ] CI uses new Action #334
  • [ ] Rename conflicting classes #250

Related to #99

The migration steps are here: https://dart.dev/null-safety/migration-guide

Important to note we should start by migrating our dependencies to the null safety version.

enhancement up-for-grabs

Most helpful comment

http, uuid and device_info are now migrated to nullsafety.

All 24 comments

package_info not null-safety ready, but easy to get rid of.
uuid not null-safety ready, not hard to get rid of but it'd be a breaking change.
http not null-safety ready, hard to get rid of and it'd be a breaking change.

@bruno-garcia for me, this is a dup.
what's the motivation for creating a new one? see #99

I'd suggest either closing this one or the other.

http, uuid and device_info are now migrated to nullsafety.

we need package_info though.
https://pub.dev/packages/package_info/versions
that's the easiest one to get rid of anyway.

package_info has also joined the null safety club. So the migration is now unblocked.

https://pub.dev/packages/http/versions/0.13.0 even went null-safety GA already, so we'll lose 10 pub points https://pub.dev/packages/sentry/score

Today null safety becomes stable! Is there any updates?

Sentry Dart needs to be rebased on the latest main branch. Sentry Flutter is yet to be migrated.

@ueman Thanks for the reply! Is there anything I can help?

Maybe this is reggard to safety null support:

I try update sentry 4.0.6 version with http 0.13.0 version

Because sentry >=4.0.0-alpha.1 depends on http ^0.12.0 and <appName> depends on http ^0.13.0, sentry >=4.0.0-alpha.1 is forbidden.

@j574144 it is

@fzyzcjy thanks for that, if you have some spare time and would like to contribute, I've updated the description with the missing bits to finish this, here a resume:

Migrate the sentry_flutter package, https://github.com/getsentry/sentry-dart/tree/main/flutter;
CI uses new Action #334; (Dart and Flutter CI)
Rename conflicting classes #250;

Let us know if you'd like to start one of them, so we will be sure that we'll get this moving and that 2 people don't work in the same thing, I'm happy to assist with code review.

@marandaneto I will look at the first one firstly (not currently, but possibly today or tomorrow, I will let you know when I start doing it).

Shall I look at the https://github.com/getsentry/sentry-dart/tree/feat/null-safety branch? It seems that the main branch has no updates

By the way, when will the null-safe sentry package be published?

@fzyzcjy yeah start it from the branch.
both packages would be published together I'd say, so we assure compatibility.

uuid 3 with null safety is released now :)

@marandaneto I start working on it recently, and will push a PR soon.

I'm gonna cut a prerelease on Monday :)

@marandaneto Looking forward to it!

https://github.com/getsentry/sentry-dart/releases/tag/4.1.0-nullsafety.0

thanks once more @ueman and @fzyzcjy

feedback is welcomed :)

I'll close this issue as the other 2 items have its own issue.

@marandaneto When can we expect the stable release for null safety?

@pushpendraKh releasing a new pre-release today and waiting for a bit more feedback, we don't want to break the user's code.

Was this page helpful?
0 / 5 - 0 ratings