Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mkorbel1 opened this issue Feb 13, 2025 · 3 comments
Closed

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

mkorbel1 opened this issue Feb 13, 2025 · 3 comments
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@mkorbel1
Copy link

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>
@bwilkerson bwilkerson added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Feb 24, 2025
@bwilkerson
Copy link
Member

@srawlins

@mkorbel1
Copy link
Author

Another repo is also hitting this same bug: https://github.com/intel/rohd-cosim

@srawlins
Copy link
Member

Apologies for the crashes. This is fixed in the dartdoc package 8.3.2 release, which will be included in Dart 3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants