Skip to content

Null-safety support #160

Description

@spixy

Running the generator with flutter pub run --no-sound-null-safety build_runner build produces:

[SEVERE] Failed to snapshot build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
[SEVERE] .dart_tool/build/entrypoint/build.dart:52:3: Warning: Operand of null-aware operation '?.' has type 'SendPort' which excludes null. - 'SendPort' is from 'dart:isolate'. sendPort?.send(result); ^Error: Cannot run with sound null safety, because the following dependenciesdon't support null safety: - package:build_runner_core - package:framy_generator - package:json_serializable - package:mobx_codegen - package:source_gen - package:build_config - package:build_runner - package:build - package:json_annotation - package:glob - package:crypto - package:logging - package:watcher - package:build_resolvers - package:timing - package:graphs - package:package_config - package:yaml - package:analyzer - package:framy_annotation - package:dart_style - package:checked_yaml - package:pubspec_parse - package:build_daemon - package:args - package:io - package:convert - package:pub_semver - package:_fe_analyzer_shared - package:mobx - package:http_multi_server - package:shelf - package:stream_transform - package:http_parser - package:mime - package:shelf_web_socket - package:web_socket_channel - package:cli_utilFor solutions, see https://dart.dev/go/unsound-null-safety.
dart_tool/build/entrypoint/build.dart:50:44: Error: The parameter 'sendPort' can't have a value of 'null' because of its type 'SendPort', but the implicit default value is 'null'. - 'SendPort' is from 'dart:isolate'.Try adding either an explicit non-'null' default value or the 'required' modifier.void main(List args, [_i7.SendPort sendPort]) async {
pub finished with exit code 78

[√] Flutter (Channel beta, 1.26.0-17.6.pre, on Microsoft Windows [Version 10.0.19042.804])
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Android Studio (version 4.1.0)
[√] VS Code, 64-bit edition (version 1.53.2)
[√] Connected device (1 available)

• No issues found!

Edit:
This is issue in build_runner and was fixed in 1.10.4 ( dart-lang/build#2966 ) which Framy does not use (yet).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions