Failed to precompile build script .dart_tool/build/entrypoint/build.dart

139 views Asked by At

I am facing a problem while updating the ferry package from 0.10.4 to 0.13.0. When executing dart run build_runner build --delete-conflicting-outputs, it always throws the next error:

`[WARNING] Invalidated precompiled build script due to core package update [WARNING] Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

  • package:quiver

For solutions, see https://dart.dev/go/unsound-null-safety [INFO] Precompiling build script... completed, took 3.3s [SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart. This is likely caused by a misconfigured builder definition.`

These are my ferry packages:

 #ferry configurations:
  ferry: ^0.13.0
  gql_http_link: ^0.4.5

dev_dependencies:
   flutter_test:
    sdk: flutter
  ferry_generator: ^0.7.0
  flutter_lints: ^2.0.1
  build_runner: ^2.3.3

I have also tried adding gql 0.14.0 to dependency_overrides but it throws the same error. Any clue about a possible solution?

2

There are 2 answers

0
peter_lagoon On BEST ANSWER

The problem was 'mockito' library. After upgrading it version I was able to upgrade 'ferry' and 'ferry_generator' libraries.

1
rrttrr On

Try this combination, use the ones you need,

dependencies:
  ferry: ^0.10.4
  ferry_hive_store: ^0.4.4
  ferry_cache: ^0.5.5
  ferry_exec: ^0.1.4
  normalize: ^0.5.5
  gql: 0.13.1-alpha+1645425888336
  gql_link: ^0.4.2-alpha+1635885531659
  gql_error_link: ^0.2.0
  gql_exec: ^0.3.2-alpha+1635885531651
  gql_code_builder: ^0.2.0
  gql_dio_link: ^0.2.2-alpha+1635885531750
  gql_dedupe_link: ^2.0.1

dev_dependencies:

  ferry_generator: ^0.4.4
  freezed: 2.0.3 # can't update to 2.0.5 until we can use analyzer 4.0


dependency_overrides:
  analyzer: ^3.4.1

Source - https://github.com/gql-dart/gql/issues/308#issuecomment-1192756840