dart-bitcoin / bip39

BSD 3-Clause "New" or "Revised" License
44 stars 72 forks source link

refactor: Migrate to nullsafety #15

Closed ookami-kb closed 3 years ago

ookami-kb commented 3 years ago
longhoangwkm commented 3 years ago

Thanks, but btw I still can't release a new version. Could you help check pub run test. Some dependencies libs are not support null safely

➜  bip39 git:(master) pub run test
Precompiling executable... (9.9s)
Precompiled test:test.
00:01 +0 -1: loading test/bip39_test.dart [E]
  Failed to load "test/bip39_test.dart":
  Unable to spawn isolate: Error: Cannot run with sound null safety, because the following dependencies
  don't support null safety:

   - package:stream_channel
   - package:test_core
   - package:test_api
   - package:test
   - package:async
   - package:stack_trace
   - package:term_glyph
   - package:boolean_selector
   - package:meta
   - package:path
   - package:matcher
   - package:string_scanner
   - package:source_span
   - package:pedantic
   - package:pool
   - package:charcode
   - package:package_config

  For solutions, see https://dart.dev/go/unsound-null-safety
00:01 +0 -1: Some tests failed.
ookami-kb commented 3 years ago

@longhoangwkm hm, that's weird. Works for me:

bip39 on  nullsafety via 🎯 v2.12.2 
❯ pub run test                                                                                                                                                                                                                      (699ms)  
Precompiling executable... (9.4s)
Precompiled test:test.
00:07 +126: All tests passed!   

Dart version:

❯ dart --version                                                                                                                                                                                                                (17s 276ms)  
Dart SDK version: 2.12.2 (stable) (Wed Mar 17 10:30:20 2021 +0100) on "macos_x64"
pubspec.lock ``` # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: _fe_analyzer_shared: dependency: transitive description: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted version: "18.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted version: "1.2.0" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted version: "2.0.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted version: "2.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted version: "1.2.0" cli_util: dependency: transitive description: name: cli_util url: "https://pub.dartlang.org" source: hosted version: "0.3.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted version: "3.0.0" coverage: dependency: transitive description: name: coverage url: "https://pub.dartlang.org" source: hosted version: "1.0.1" crypto: dependency: "direct main" description: name: crypto url: "https://pub.dartlang.org" source: hosted version: "3.0.0" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted version: "6.1.0" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted version: "2.0.0" hex: dependency: "direct main" description: name: hex url: "https://pub.dartlang.org" source: hosted version: "0.2.0" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted version: "3.0.0" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted version: "4.0.0" io: dependency: transitive description: name: io url: "https://pub.dartlang.org" source: hosted version: "1.0.0" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted version: "0.6.3" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted version: "1.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted version: "1.3.0" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted version: "1.0.0" node_preamble: dependency: transitive description: name: node_preamble url: "https://pub.dartlang.org" source: hosted version: "2.0.0" package_config: dependency: transitive description: name: package_config url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted version: "1.8.0" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted version: "1.11.0" pointycastle: dependency: "direct main" description: name: pointycastle url: "https://pub.dartlang.org" source: hosted version: "3.0.0-nullsafety.2" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted version: "1.5.0" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted version: "1.1.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler url: "https://pub.dartlang.org" source: hosted version: "3.0.0" shelf_static: dependency: transitive description: name: shelf_static url: "https://pub.dartlang.org" source: hosted version: "1.0.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted version: "1.0.1" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace url: "https://pub.dartlang.org" source: hosted version: "2.1.0" source_maps: dependency: transitive description: name: source_maps url: "https://pub.dartlang.org" source: hosted version: "0.10.10" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted version: "1.16.8" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted version: "0.3.0" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted version: "0.3.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vm_service: dependency: transitive description: name: vm_service url: "https://pub.dartlang.org" source: hosted version: "6.1.0+1" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted version: "2.0.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted version: "1.0.0" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: dart: ">=2.12.0 <3.0.0" ```

Do you have the latest dart version and did you run pub upgrade?

longhoangwkm commented 3 years ago

Thanks, It works after pub upgrade.

longhoangwkm commented 3 years ago

I've published it as https://pub.dev/packages/bip39/versions/1.0.6 version