Skip to content

dartdoc is dropping type parameters from implements clause, other places #1514

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

Closed
jcollins-g opened this issue Oct 10, 2017 · 0 comments · Fixed by #1524
Closed

dartdoc is dropping type parameters from implements clause, other places #1514

jcollins-g opened this issue Oct 10, 2017 · 0 comments · Fixed by #1524
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@jcollins-g
Copy link
Contributor

jcollins-g commented Oct 10, 2017

Discovered while researching #1512: Some changes in #1509 (https://github.com/dart-lang/dartdoc/blame/master/lib/src/element_type.dart#L80) tweaked the heuristic (necessary due to dart-lang/sdk#30998) we use to determine whether to display type parameters. It appears while I improved things for generic functions, I regressed them in more common cases.

Compare return type of 'distinct' on:
https://api.dartlang.org/stable/1.24.2/dart-io/Socket-class.html
vs
https://api.dartlang.org/be/150864/dart-io/Socket-class.html

Since the new dartdoc drops the type parameter, it implies the return type's 'Stream<T>' is related to the type parameter for Socket. But it really isn't, it was explicitly specified in the 'implements' clause as List<int>.

P1 since it has high impact (implies something that is not true about the return type, with no way to tell besides looking at source code that it might be wrong).

@jcollins-g jcollins-g added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Oct 10, 2017
@jcollins-g jcollins-g self-assigned this Oct 10, 2017
@jcollins-g jcollins-g changed the title dartdoc is dropping type parameters too often dartdoc is dropping type parameters from implements clause, other places Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant