glesica / dcdg.dart

Dart Class Diagram Generator
https://pub.dartlang.org/packages/dcdg
Apache License 2.0
158 stars 33 forks source link

Null check operator used on a null value error #68

Open jihuncha opened 2 months ago

jihuncha commented 2 months ago

Hello, I'm using UML diagram generation through GitHub Actions, and I've encountered the following error after modifying an object recently:

`Null check operator used on a null value

0 ElementAnnotationExtensions.targetKinds (package:analyzer/src/dart/element/extensions.dart:42:51)

1 BestPracticesVerifier.visitAnnotation (package:analyzer/src/error/best_practices_verifier.dart:299:25)

2 AnnotationImpl.accept (package:analyzer/src/dart/ast/ast.dart:298:50)

3 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7758:20)

4 AnnotatedNodeImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:145:17)

5 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1510:11)

6 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:746:10)

7 BestPracticesVerifier.visitClassDeclaration (package:analyzer/src/error/best_practices_verifier.dart:371:13)

8 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1487:50)

9 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7758:20)

10 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2095:21)

11 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:770:10)

12 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2088:50)

13 LibraryAnalyzer._computeHints (package:analyzer/src/dart/analysis/library_analyzer.dart:358:10)

14 LibraryAnalyzer.analyze. (package:analyzer/src/dart/analysis/library_analyzer.dart:166:9)

15 LinkedHashMapMixin.forEach (dart:collection-patch/compacthash.dart:633:13)

16 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:165:13)

17 AnalysisDriver._computeAnalysisResult. (package:analyzer/src/dart/analysis/driver.dart:1455:63)

18 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15)

19 AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1431:20)

20 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1055:22)

21 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2140:24)

#0 AnalysisDriver._computeAnalysisResult. (package:analyzer/src/dart/analysis/driver.dart:1484:9) #1 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15) #2 AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1431:20) #3 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1055:22) #4 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2140:24)` I'm using @JsonSerializable() in my model. Could this be causing the issue? I couldn't find any similar issues, so I'm creating this to inquire about the problem. Thank you for your assistance.
roberto-ingenito commented 1 month ago

I have the same problem, once I removed JsonSerializable it no longer has the problem