Repository navigation
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regression
Description
The engine->framework roller is failing due to an exception when running Dartdoc.
dartdoc:stdout: Documenting Flutter...
dartdoc:stdout: Discovering libraries...
dartdoc:stdout: Linking elements...
dartdoc:stderr:
dartdoc:stderr: dartdoc 8.0.0 (/b/s/w/ir/x/w/.pub-cache/global_packages/dartdoc/bin/dartdoc.dart-3.3.0-202.0.dev.snapshot) failed: 'package:dartdoc/src/model/typedef.dart': Failed assertion: line 97 pos 12: 'modelType.modelElement is Class': is not true.
dartdoc:stderr: #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
dartdoc:stderr: #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
dartdoc:stderr: #2 new ClassTypedef (package:dartdoc/src/model/typedef.dart:97:12)
dartdoc:stderr: #3 ModelElement._constructFromElementDeclaration (package:dartdoc/src/model/model_element.dart:331:9)
dartdoc:stderr: #4 new ModelElement._from (package:dartdoc/src/model/model_element.dart:272:40)
dartdoc:stderr: #5 ModelElementBuilderImpl.from (package:dartdoc/src/model/model_element.dart:68:20)
dartdoc:stderr: #6 Library.typedefs.<anonymous closure> (package:dartdoc/src/model/library.dart:360:32)
dartdoc:stderr: #7 MappedIterator.moveNext (dart:_internal/iterable.dart:403:20)
dartdoc:stderr: #8 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202:26)
dartdoc:stderr: #9 new _List._ofOther (dart:core-patch/array.dart:175:43)
dartdoc:stderr: #10 new _List.of (dart:core-patch/array.dart:129:18)
dartdoc:stderr: #11 new List.of (dart:core-patch/array_patch.dart:39:50)
dartdoc:stderr: #12 Iterable.toList (dart:core/iterable.dart:497:7)
dartdoc:stderr: #13 Library.typedefs (package:dartdoc/src/model/library.dart:361:8)
dartdoc:stderr: #14 Library.modelElementsMap.<anonymous closure> (package:dartdoc/src/model/library.dart:406:18)
dartdoc:stderr: #15 Library.modelElementsMap (package:dartdoc/src/model/library.dart:419:4)
dartdoc:stderr: #16 Library.allModelElements (package:dartdoc/src/model/library.dart:422:35)
dartdoc:stderr: #17 PackageGraph._gatherModelElements (package:dartdoc/src/model/package_graph.dart:898:36)
dartdoc:stderr: #18 PackageGraph._precacheLocalDocs (package:dartdoc/src/model/package_graph.dart:166:28)
dartdoc:stderr: #19 PackageGraph.initializePackageGraph (package:dartdoc/src/model/package_graph.dart:132:23)
dartdoc:stderr: #20 PubPackageBuilder.buildPackageGraph (package:dartdoc/src/model/package_builder.dart:90:20)
dartdoc:stderr: <asynchronous suspension>
dartdoc:stderr: #21 Dartdoc.generateDocsBase (package:dartdoc/src/dartdoc.dart:196:24)
dartdoc:stderr: <asynchronous suspension>
dartdoc:stderr: #22 Dartdoc.generateDocs (package:dartdoc/src/dartdoc.dart:240:24)
dartdoc:stderr: <asynchronous suspension>
dartdoc:stderr: #23 Dartdoc.executeGuarded.<anonymous closure> (package:dartdoc/src/dartdoc.dart:275:9)
dartdoc:stderr: <asynchronous suspension>
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regression
Activity
jason-simmons commentedon Dec 7, 2023
This started with flutter-team-archive/engine@caf82ba
Revert Dart SDK back to be8a95b6717d
srawlins commentedon Dec 7, 2023
I think this is the culprit: https://dart-review.googlesource.com/c/sdk/+/332860 committed as https://dart.googlesource.com/sdk.git/+/b1a7ca77e0272071f41d9eeaadadc52906a1dbc9.
It's not a "bad" commit, it just triggers a bug in dartdoc. In order to keep @srujzs unblocked, we could suppress whatever this dartdoc check is, or perhaps run dartdoc without assertions enabled?
srujzs commentedon Dec 7, 2023
Is there a fix forward where I can disable dartdoc checks for that specific file until dartdoc gets updated to handle extension types (I think that's what's needed here long-term iiuc)?
Revert Dart SDK back to be8a95b6717d (#48799)
srawlins commentedon Dec 7, 2023
Yeah dartdoc needs a fix. I can't think of a nice fix forward... the assertion error occurs while dartdoc is just reading and resolving the files in js_interop. There might be a configuration to say "don't document this package", but if js_interop is referenced anywhere by other documented packages, I think the assertion error will still occur.
srawlins commentedon Dec 7, 2023
I should be able to land the fix for dartdoc quickly (this afternoon), but then it independently gets synced into both the Dart SDK, and the Flutter SDK via a pub publish :/
srujzs commentedon Dec 7, 2023
I guess that's a matter of updating DEPS and then it getting rolled into Flutter?
If the dartdoc fix will take longer than expected or we can't disable or configure dartdoc to avoid this in Flutter, a revert is fine with me. I'm not too blocked on it as long as it doesn't take too long. :D
srawlins commentedon Dec 7, 2023
Not quite. I'm not sure what this test is, but in Flutter, we use a copy of dartdoc that is published. So they
pub global activatesome release of dartdoc. In the Dart SDK, yes it's a roll to DEPS.This should take only hours, but I don't want to promise that it will be all released by 5pm or anything.
srawlins commentedon Dec 7, 2023
I've pulled in @kallentu and she just mailed dart-lang/dartdoc#3595. After this we'll bump dartdoc's version, release to pub, and then bump the dartdoc version in flutter.
kallentu commentedon Dec 8, 2023
✅ Fix is in.
✅ Dartdoc is bumped up to 8.0.2.
✅ Just need a review on the Dartdoc version bump in Flutter (#139780) and then the fix should be good to go.
Bump Dartdoc to 8.0.2 (#139780)
srawlins commentedon Dec 8, 2023
Is this roll restarted?
jason-simmons commentedon Dec 8, 2023
The Dart->engine and engine->framework rollers are running again.
github-actions commentedon Dec 22, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.