Skip to content
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

References to nested types in other packages are misnamed (missing .) #2245

Closed
asfalcone opened this issue Nov 23, 2021 · 4 comments
Closed
Labels
bug feedback: Google An issue/PR submitted by colleagues at Google, most likely related to the Android API reference docs regression An issue/bug that appeared after recent changes

Comments

@asfalcone
Copy link
Contributor

Describe the bug
References to nested types in other packages are misnamed (missing .)

Expected behaviour
PagingDataAdapter references androidx.recyclerview.widget.DiffUtil.ItemCallback as type for a constructor param. The name of the type should be DiffUtil.ItemCallback but instead it is parsed into the model incorrectly as DiffUtilItemCallback which causes links to not resolve

Screenshots
If applicable, add screenshots to help explain your problem
image

abstract class PagingDataAdapter<T : Any, VH : RecyclerView.ViewHolder> @JvmOverloads constructor(
    diffCallback: DiffUtil.ItemCallback<T>,
    mainDispatcher: CoroutineDispatcher = Dispatchers.Main,
    workerDispatcher: CoroutineDispatcher = Dispatchers.Default
) : RecyclerView.Adapter<VH>() {

(source code: https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testData/paging/source/androidx/paging/PagingDataAdapter.kt;l=62)

Installation

  • Dokka version: 1.6.0-dev-128
    (This is a regression since 1.6.0-dev-122).
@asfalcone asfalcone added the bug label Nov 23, 2021
@vmishenev vmishenev added the feedback: Google An issue/PR submitted by colleagues at Google, most likely related to the Android API reference docs label Nov 23, 2021
@vmishenev vmishenev added the regression An issue/bug that appeared after recent changes label Dec 5, 2021
@vmishenev
Copy link
Member

Now on your master branch I can not find a class DiffUtil.ItemCallback<>
By testData/paging/docs/reference/kotlin/androidx/paging/PagingDataAdapter.html it does not resolve and renders as ERROR CLASS.
On practice we do not use DRI.callable for unresolved classes. This bug appears only for such classes in DRI.callable.

But anyway I will fix it, unfortunately, it is on Kotlin compiler side.
image

@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Dec 20, 2021

Running tests for devsite plugin with upcoming 1.6.10 now, and it seems like either it has gotten better (after upgrading Kotlin) or I'm just lucky with my local runs. Some (if not all) tests from com.google.devsite.integration.BasicTest now fail because the dot is present in places where it wasn't at the time of generating test data.

Example

- AlignmentHorizontal
+ Alignment.Horizontal

-  <p>Used to specify the vertical arrangement of the layout's children in layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Column(Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,AlignmentHorizontal,kotlin.Function1)">Column</a></code>.</p>
+  <p>Used to specify the vertical arrangement of the layout's children in layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Column(Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,Alignment.Horizontal,kotlin.Function1)">Column</a></code>.</p>

So it may have been fixed in the kotlin compiler (I'll try to verify it), just wanted to give you a heads up.

@asfalcone
Copy link
Contributor Author

Appears fixed in 1.6.10-dev-139

@IgnatBeresnev
Copy link
Member

Nice to hear!

I'll close the issue for now, we'll reopen and investigate it further if it starts happening again. Hopefully, this has been fixed for good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feedback: Google An issue/PR submitted by colleagues at Google, most likely related to the Android API reference docs regression An issue/bug that appeared after recent changes
Projects
None yet
Development

No branches or pull requests

3 participants