-
Notifications
You must be signed in to change notification settings - Fork 124
Reference links within extension methods are unimplemented #2033
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
There seem to be some missing cases around resolution of links to extension methods. Will try to add these in. |
It looks like most cases where we are referring to an extension method or its parameters via a documentation reference are not implemented, and risk crashes. Elevating bug to P0. |
@jcollins-g This might be a blocker for D26, since all our tools need to support extension methods and the core libraries, |
It does not appear to be just references to extension members, but any reference in the documentation of such. extension Foo on int {
/// Returns [toRadixString] or something.
String toHexString() => toRadixString(16);
} and extension Foo on int {
/// Returns [int.toRadixString] or something.
String toHexString() => toRadixString(16);
} crash. Neither refer to an extension member, but it will have to resolve an identifier relatively to the context of the extension. |
yes, everything involving references in extension methods is just broken. today I'll have a PR to patch it over with not implemented yet. |
#2040 patches this over, but we still need the actual implementation. |
There is a design for the rewrite of comment reference lookups and the beginning of an implementation, but, being a large piece, this keeps getting punted behind other new feature work. |
Any chance we can have a temporary bandaid here that just silences the warning? I'm about to want to commit an extension method to the Flutter codebase and this bug makes it impossible to do so (since we also require documentation on everything). (Ironically we generally disallow extension methods so this would normally not matter but in this case it's specifically a deprecation migration aid...) |
To silence the warning, you can disable the "not-implemented" warning in dartdoc. It is only used for this problem right now. |
Ah awesome, thanks. |
That didn't work because the hyperlinks themselves are still not resolved. :-) Anyway I'll just remove the hyperlinks for now. |
This is now fixed in dartdoc 1.0.0. |
Given a library like:
Running dart doc crashes. It doesn't happen if I remove
[another]
. When it tries to resolve the reference there is a type error.The text was updated successfully, but these errors were encountered: