0

クラスを使用して objectbox_generator を実行するflutter packages pub run build_runner watchと、JSON で生成されますが、その直後に null チェックの問題により生成が失敗します。コードをチェックしたところ、null チェックの問題は見つかりませんでした。より詳細なログを表示する方法はありますか (ログの場所など)。

[INFO] Starting Build

[INFO] Updating asset graph...
[INFO] Updating asset graph completed, took 0ms

[INFO] Running build...
[INFO] 1.0s elapsed, 14/20 actions completed.
[INFO] 2.1s elapsed, 38/54 actions completed.
[INFO] Running build completed, took 2.4s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 100ms

// Here the failing info

[SEVERE] objectbox_generator:generator on lib/$lib$ (cached):

Null check operator used on a null value

[SEVERE] Failed after 2.5s

追加情報を含む同じコマンドflutter packages pub run build_runner build --verbose:

[INFO] Build:Running build...
[INFO] objectbox_generator:generator on lib/$lib$:Package: fit_x
[INFO] objectbox_generator:generator on lib/$lib$:Found 15 entities in: (lib/domain/ob/collection_exercise.objectbox.info, lib/domain/ob/equipment.objectbox.info, lib/domain/ob/equipment_setting.objectbox.info, ..., lib/domain/ob/workout_collection.objectbox.info, lib/domain/ob/workout_log.objectbox.info)
[INFO] objectbox_generator:generator on lib/$lib$:Using model: lib/objectbox-model.json
[SEVERE] objectbox_generator:generator on lib/$lib$:

Null check operator used on a null value
package:objectbox_generator/src/code_chunks.dart 444:38  CodeChunks.backlinkRelInfo
package:objectbox_generator/src/code_chunks.dart 488:18  CodeChunks.toManyRelations.<fn>
dart:_internal                                           ListIterable.join
package:objectbox_generator/src/code_chunks.dart 489:12  CodeChunks.toManyRelations
package:objectbox_generator/src/code_chunks.dart 134:46  CodeChunks.entityBinding
package:objectbox_generator/src/code_chunks.dart 32:71   CodeChunks.objectboxDart.<fn>
package:collection/src/iterable_extensions.dart 173:20   IterableExtension.mapIndexed
dart:core                                                Iterable.join
package:objectbox_generator/src/code_chunks.dart 32:99   CodeChunks.objectboxDart
package:objectbox_generator/src/code_builder.dart 97:27  CodeBuilder.updateCode
package:objectbox_generator/src/code_builder.dart 57:5   CodeBuilder.build

[INFO] Build:Running build completed, took 349ms

[INFO] Build:Caching finalized dependency graph...
[INFO] Build:Caching finalized dependency graph completed, took 117ms

[SEVERE] Build:
Failed after 476ms
[+3823 ms] "flutter run" took 3.927ms.
[   +5 ms] pub finished with exit code 1
[   +2 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      _DefaultPub.interactively (package:flutter_tools/src/dart/pub.dart:366:7)
           <asynchronous suspension>
           #2      PackagesForwardCommand.runCommand (package:flutter_tools/src/commands/packages.dart:241:5)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #5      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
           <asynchronous suspension>
           #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)    
           <asynchronous suspension>
           #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
           <asynchronous suspension>
           #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>


[  +74 ms] ensureAnalyticsSent: 67ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1
4

1 に答える 1