Skip to content

Crash: dart doc newly fails with stable Dart v3.7.0 #3996

Closed
@mkorbel1

Description

@mkorbel1

With the latest release of Dart (v3.7.0), dart doc now crashes on the rohd package.

I'm unable to reproduce the issue with a clone of dartdoc from the latest on main from https://github.com/dart-lang/dartdoc, and I can't tell which commit was used to create the version included with Dart 3.7.0, so I am having trouble figuring out what aspect of the rohd package repository is leading to this crash.

This pull request on rohd is reproducing a failure:
intel/rohd#564
https://github.com/intel/rohd/actions/runs/13297015330/job/37131152673?pr=564

This is also reproducing on the main branch of rohd, so you should be able to clone from https://github.com/intel/rohd.git and just run dart doc with Dart v3.7.0 to reproduce the same failure.

$ dart --version
Dart SDK version: 3.7.0 (stable) (None) on "linux_x64"

$ dart doc
Documenting rohd...
Discovering libraries...
[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] (100.00%)

Linking elements...
[-                                                                                                                                                                                                                                                                                       ] (0.10%)
dartdoc 8.3.1-wip (/home/max/work/rohd/dartdev) failed: LateInitializationError: Field 'objectClass' has not been initialized.
#0      PackageGraph.objectClass (package:dartdoc/src/model/package_graph.dart)
#1      Mixin.superclassConstraints.<anonymous closure> (package:dartdoc/src/model/mixin.dart:22:54)
#2      WhereIterator.moveNext (dart:_internal/iterable.dart:468:13)
#3      new _GrowableList._ofOther (dart:core-patch/growable_array.dart:203:26)
#4      new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
#5      new List.of (dart:core-patch/array_patch.dart:40:18)
#6      Mixin.superclassConstraints (package:dartdoc/src/model/mixin.dart:18:69)
#7      Mixin.superclassConstraints (package:dartdoc/src/model/mixin.dart)
#8      Mixin.inheritanceChain (package:dartdoc/src/model/mixin.dart:35:8)
#9      Mixin.inheritanceChain (package:dartdoc/src/model/mixin.dart)
#10     Class.inheritanceChain (package:dartdoc/src/model/class.dart:36:20)
#11     Class.inheritanceChain (package:dartdoc/src/model/class.dart)
#12     InheritingContainer._inheritedElements.<anonymous closure> (package:dartdoc/src/model/inheriting_container.dart:157:9)
#13     InheritingContainer._inheritedElements (package:dartdoc/src/model/inheriting_container.dart:196:4)
#14     InheritingContainer._inheritedElements (package:dartdoc/src/model/inheriting_container.dart)
#15     InheritingContainer.inheritedMethods (package:dartdoc/src/model/inheriting_container.dart:104:35)
#16     InheritingContainer.instanceMethods (package:dartdoc/src/model/inheriting_container.dart:356:12)
#17     Container.allModelElements (package:dartdoc/src/model/container.dart:59:12)
#18     InheritingContainer._allModelElements (package:dartdoc/src/model/inheriting_container.dart:98:14)
#19     InheritingContainer._allModelElements (package:dartdoc/src/model/inheriting_container.dart)
#20     InheritingContainer.allModelElements (package:dartdoc/src/model/inheriting_container.dart:281:46)
#21     Class.allModelElements (package:dartdoc/src/model/class.dart:22:14)
#22     Class.allModelElements (package:dartdoc/src/model/class.dart)
#23     Library.allModelElements (package:dartdoc/src/model/library.dart:440:46)
#24     Library.allModelElements (package:dartdoc/src/model/library.dart)
#25     PackageGraph._gatherModelElements (package:dartdoc/src/model/package_graph.dart:882:36)
#26     PackageGraph._precacheLocalDocs (package:dartdoc/src/model/package_graph.dart:160:28)
#27     PackageGraph.initializePackageGraph (package:dartdoc/src/model/package_graph.dart:126:11)
#28     PubPackageBuilder.buildPackageGraph (package:dartdoc/src/model/package_builder.dart:120:22)
<asynchronous suspension>
#29     Dartdoc.generateDocsBase (package:dartdoc/src/dartdoc.dart:189:24)
<asynchronous suspension>
#30     Dartdoc.generateDocs (package:dartdoc/src/dartdoc.dart:241:24)
<asynchronous suspension>
#31     Dartdoc.executeGuarded.<anonymous closure> (package:dartdoc/src/dartdoc.dart:273:9)
<asynchronous suspension>

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions