-
Notifications
You must be signed in to change notification settings - Fork 124
Implement generic function type syntax in dartdoc #1321
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
punted to 1.23 |
@devoncarew who should this be assigned to? |
I'm willing to take a look, but it looks like from the description, it will be dependent on analyzer support. |
@jcollins-g, thanks! If this needs a new analyzer library, we can either backport the necessary work to the 0.29 release of analyzer, release an entirely new 0.30 version, or solve the issue by moving dartdoc into the sdk repo. |
It looks like dart_style (dart-lang/dart_style#563) will also need a version of the analyzer w/ generic function type support. |
Analyzer is done! |
I'll start looking at this today. |
The last full push to trunk is Wednesday early morning. Is this likely to land by then? |
Implementation & tests complete, assuming I understand the feature correctly. Blocking on landing of cl 2778253002, landing a backport of this and related CLs to the analyzer 0.29 branch in SDK, publishing the new analyzer package, and then submitting my change to dartdoc. So it is going to be hard to get all that done in the next several hours. Declared NewGenericTypedef as below:
|
Looks good! See the generic type info 👍 |
@bwilkerson I think these are the blocking items we need from analyzer:
|
CL 2778253002 has landed. With this change, old and new versions of dartdoc at least do not crash or have missing docs, though the older dartdoc does have a cosmetic problem with some extra whitespace in the parameter list which I fixed in the branch. We can choose any of:
|
Actually, it turns out the cosmetic problem was introduced after 0.9.12. So this should not be a blocking issue at all for 1.23 -- just use 0.9.12 dartdoc as it is currently configured. We'll still need to get this untangled eventually for flutter and other non-SDK customers, so I'd prefer to leave the issue open until this actually can be committed to dartdoc head. |
Sounds like we still want to track, but can drop the |
The example given isn't a very good one because there are two type parameters with the same name. A better example would be
The Dartdoc also appears to miss the fact that there are two lists of type parameters, so I think it needs some updating. Whether that needs to happen before 1.23 is someone else's call. |
Discussed with Brian; since the type parameter is unresolved it makes sense to put that after NewGenericTypedef in the example above. (So it would be Which while a little confusing looking is also more accurate, as it answers the question "where did |
Now that I understand the feature better I think this really does need to be improved. New screenshots showing the change: It's still not great; note how |
CL 2787513003 uploaded for analyzer, generic-function-types branch updated with new tests. dartdoc branch is still pending a published version of analyzer containing these changes. |
@jcollins-g @bwilkerson where are we at with this one? |
I'm going to tag the branch and manually test dartdoc merged with the SDK today, and we can ship an SDK that contains dartdoc (even though dartdoc head is broken). |
proposed tag for 0.9.14-dev: b1f60db4e0d1550487d622dd62d8225c96682dc7, on branch generic-function-types |
@jcollins-g, with https://codereview.chromium.org/2795653003/, we're good to close this? |
Now that the revision is merged to the SDK, I'm OK with removing the 1.23 tag. Don't want to close until we have an analyzer published package containing the changes. |
Support is in published dartdoc with 0.12.0. |
This is the dartdoc-implementation issue for dart-lang/sdk#27527.
The text was updated successfully, but these errors were encountered: