dart-sip-ua icon indicating copy to clipboard operation
dart-sip-ua copied to clipboard

null safety

Open enesuludg opened this issue 3 years ago • 10 comments

Do you have a plan to update to null safety?

enesuludg avatar Aug 16 '21 11:08 enesuludg

bump

ingmferrer avatar Aug 19 '21 16:08 ingmferrer

bump

devalensio avatar Aug 25 '21 09:08 devalensio

Feel free to submit a Pull Request. We sponsored this work and made it open source. If you're benefiting from that, please contribute. Null safety isn't hard to add as your IDE can help. Just lack of time on our side.

ghenry avatar Aug 25 '21 09:08 ghenry

Feel free to submit a Pull Request. We sponsored this work and made it open source. If you're benefiting from that, please contribute. Null safety isn't hard to add as your IDE can help. Just lack of time on our side.

While trying to migrate to null safety, it fails with grammar_parser.dart

Analyzing project...
[------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------]Bad state:
Error: package has unmigrated dependencies.

Before migrating your package, we recommend ensuring that every library it
imports (either directly or indirectly) has been migrated to null safety, so
that you will be able to run your unit tests in sound null checking mode.  You
are currently importing the following non-null-safe libraries:

  package:sip_ua/src/grammar_parser.dart

Please upgrade the packages containing these libraries to null safe versions
before continuing.  To see what null safe package versions are available, run
the following command: `dart pub outdated --mode=null-safety`.

To skip this check and try to migrate anyway, re-run with the flag
`--skip-import-check`.

mroshini avatar Sep 06 '21 12:09 mroshini

@mroshini grammar_parser.dart is generated from grammar.peg This file cannot be modified manually because the amount of code is too large, unless we rewrite a sip header parser, maybe we can use some kind of ignore settings, or skip the null safety check for this file

Here are the steps to generate this file https://github.com/flutter-webrtc/dart-sip-ua/tree/master/tool

cloudwebrtc avatar Sep 06 '21 12:09 cloudwebrtc

@mroshini grammar_parser.dart is generated from grammar.peg This file cannot be modified manually because the amount of code is too large, unless we rewrite a sip header parser, maybe we can use some kind of ignore settings, or skip the null safety check for this file

Here are the steps to generate this file https://github.com/flutter-webrtc/dart-sip-ua/tree/master/tool

I skipped the null safety check for grammar_parser.dart, other files were migrated to null-safety but I'm not able to run the project due to grammar_parser.dart is non nullable file and also the mentioned peg from the above link is not supporting for dart 2.x, so I tried with another package called peg2 but it failed with the following StackTrace.

pub global run peg2 grammar.peg
Unhandled exception:
FormatException: Syntax error, expected 'library prefix', 'type name' (at line 275, character 10)
CRLF    <- "\r\n"
         ^

#0      main (file:///Users/roshini/.pub-cache/hosted/pub.dartlang.org/peg2-0.2.11/bin/peg2.dart:59:5)
#1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#2      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)


Please shed some light on this issue.

mroshini avatar Sep 07 '21 14:09 mroshini

Please support null safety

a42279395 avatar Sep 18 '21 06:09 a42279395

Please support null safety

@a42279395 You can fund anyone to complete this task because this upgrade has a lot of work, Maybe @mroshini is already doing it, you can try to sponsor.

cloudwebrtc avatar Sep 18 '21 13:09 cloudwebrtc

any update for that?

soring323 avatar Oct 27 '21 10:10 soring323

it's very important part.

soring323 avatar Oct 27 '21 10:10 soring323