Skip to content

Engine->framework roller blocked due to Dartdoc regression #139755

Closed

Description

@jason-simmons

The engine->framework roller is failing due to an exception when running Dartdoc.

Example: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20docs_test/40237/overview

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>

Activity

  1. added
    P0Critical issues such as a build break or regression
    on Dec 7, 2023
  2. jason-simmons commented on Dec 7, 2023

    @jason-simmons
    ContributorAuthor
  3. srawlins commented on Dec 7, 2023

    @srawlins
    Contributor

    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?

  4. srujzs commented on Dec 7, 2023

    @srujzs
    Contributor

    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)?

  5. srawlins commented on Dec 7, 2023

    @srawlins
    Contributor

    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.

  6. srawlins commented on Dec 7, 2023

    @srawlins
    Contributor

    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 :/

  7. srujzs commented on Dec 7, 2023

    @srujzs
    Contributor

    it independently gets synced into both the Dart SDK, and the Flutter SDK via a pub publish

    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

  8. srawlins commented on Dec 7, 2023

    @srawlins
    Contributor

    I guess that's a matter of updating DEPS and then it getting rolled into Flutter?

    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 activate some release of dartdoc. In the Dart SDK, yes it's a roll to DEPS.

    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.

    This should take only hours, but I don't want to promise that it will be all released by 5pm or anything.

  9. srawlins commented on Dec 7, 2023

    @srawlins
    Contributor

    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.

  10. kallentu commented on Dec 8, 2023

    @kallentu
    Contributor

    ✅ 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.

  11. added a commit that references this issue on Dec 8, 2023
  12. srawlins commented on Dec 8, 2023

    @srawlins
    Contributor

    Is this roll restarted?

  13. jason-simmons commented on Dec 8, 2023

    @jason-simmons
    ContributorAuthor

    The Dart->engine and engine->framework rollers are running again.

  14. github-actions commented on Dec 22, 2023

    @github-actions

    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 -v and a minimal reproduction of the issue.

  15. locked as resolved and limited conversation to collaborators on Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical issues such as a build break or regression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions