-
Notifications
You must be signed in to change notification settings - Fork 125
We need to migrate to null-safety #2737
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
Comments
the NNBD migration is ongoing in the nnbd branch on dartdoc. I have just started this process. |
@jonataslaw If you wish to contribute one or more library migrations to the NNBD migration effort, that would be welcome. Please see #2748 for a simple example of a migration, and target it for the nnbd branch as that PR is targeted, and if possible please announce here which library you intend to migrate as to avoid duplication of effort. Note that "migrating" in this case may require more extensive API changes, some of which can and probably should be done before the actual migration, e.g. #2745. |
my status today: migrating |
looking at |
@jcollins-g do we have any update on this effort? I'd like to get the CLI migrated to null safety sooner than later and |
Complete. |
Hi, I would like to propose switching to null-safety.
I can contribute to this if there is no blockage.
I noticed that there are many packages in pub.dev that have their score downgraded because of dartdoc issues, and these issues could be easily fixed if we had null security, which prevents new null bugs from being inserted with every update.
Looking at the source, I can see for example that there are many ifs without else that can potentially cause bugs, for example:
https://github.com/dart-lang/dartdoc/blob/master/lib/src/model/type_parameter.dart#L38
boundType
cannot be null since we use this class's getter all the time, for example:https://github.com/dart-lang/dartdoc/blob/master/lib/src/model/type_parameter.dart#L71
However, let's look at this code:
This is causing a ton of errors in pub.dev packages. We can take, for example, the most liked package from pub.dev:
https://pub.dev/packages/get/score
This is for the reason mentioned above. The problem is that this isn't the only place we have if without elses delivering null, and the solution to that would be to migrate to null-safety.
Is there a block for this? Otherwise I can do a PR with the migration.
The text was updated successfully, but these errors were encountered: