dart-sip-ua
dart-sip-ua copied to clipboard
null safety
Do you have a plan to update to null safety?
bump
bump
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.
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 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
@mroshini
grammar_parser.dart
is generated fromgrammar.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 fileHere 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.
Please support null safety
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.
any update for that?
it's very important part.