-
Notifications
You must be signed in to change notification settings - Fork 124
Dartdoc crashes on "Future<void> foo()" #1625
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
Comments
This reverts commit 44aa9a1. Reason for revert: The dartdoc API documentation generator cannot handle Future<void> yet. This is filed as a P0 issue, and the change should be relanded when it is fixed: dart-lang/dartdoc#1625 Original change's description: > Do not return this on RandomAccessFile.close > > Bug: 32015 > Change-Id: I98508bdad569201afeed91f1287f061b5bb39a31 > Reviewed-on: https://dart-review.googlesource.com/44060 > Reviewed-by: Sigmund Cherem <sigmund@google.com> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com> > Commit-Queue: Vyacheslav Egorov <vegorov@google.com> TBR=lrn@google.com,vegorov@google.com,zra@google.com,sigmund@google.com,lexa.knyazev@gmail.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 32015 Change-Id: I658b997cdc62e23cfb4fec8921e19239d534e272 Reviewed-on: https://dart-review.googlesource.com/44980 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: William Hesse <whesse@google.com>
f.element is null because VoidTypeImpls don't have elements, which is by design. Types without elements aren't known to dartdoc yet and I'll have to wire this in. May take a bit to turn around as there are a lot of assumptions in dartdoc that any type has an element. |
Hacking it up so it doesn't crash for |
Is there any estimate on the fix (or at least a partial fix)? |
Uh oh!
There was an error while loading. Please reload this page.
The Dart language now allows
Future<void>
, and the type of dart:io RandomAccessFile.close() has been changed to that in commit44aa9a17fd8ca5278dfe12590ad48212fefda4dd
Future<void> close();
instead ofFuture<RandomAccessFile> close();
This causes a crash in line 176 of src/element_type.dart, where f.element.library is tested against null, to special-case
A<dynamic>
. But withA<void>
,f.element
is itself null. If we change tof.element?.library != null
, we get a crash in the call toModelElement.from(f.element, lib)
, again, where there is special casing for dynamic, but not for void.Flutter code is being changed to use
Future<void>
, and this IO change should also land, so we need to handle this case.Reverting 44aa9a17fd8ca5278dfe12590ad48212fefda4dd until this is fixed and rolled to Dart SDK
The builder with the failure is:
https://ci.chromium.org/buildbot/client.dart/dart-sdk-linux-be/19230
@jcollins-g
@jcollins-g: edited to escape types
The text was updated successfully, but these errors were encountered: