JakeWharton / SdkSearch

An Android app and Chrome extension for searching the Android SDK documentation.
Apache License 2.0
2.06k stars 176 forks source link

Javadocs show up in omnibar with class name twice, compared to KDocs #183

Open ChrisCraik opened 4 years ago

ChrisCraik commented 4 years ago

I understand showing both, since they're both on DAC, but the labeling is confusing.

For Debug's javadocs (https://developer.android.com/reference/android/os/Debug)

The name is shown as: android.os.Debug.Debug

While for the kdocs (https://developer.android.com/reference/kotlin/android/os/Debug)

The name shows in the omnibar as: android.os.Debug

Consider adding "(kdocs)" or "(javadocs)" to one of them instead to distinguish.

JakeWharton commented 4 years ago

Hmm I think this is because I haven't released the extension in a while (thanks kotlin-js) and it still is using old code to sync its database. The new behavior throws all data away and the old behavior incrementally updated things.

The API only returns a single entry for Debug:

$ curl -s https://api.sdksearch.app/list | jq '.[] | select(.className=="Debug")'
{
  "packageName": "android.os",
  "className": "Debug",
  "deprecated": false,
  "link": "https://developer.android.com/reference/kotlin/android/os/Debug",
  "api": 0
}

If you want you can download and try the latest debug build: https://1661-114199331-gh.circle-artifacts.com/0/frontend/chrome-extension/build/distributions/sdk-search-debug.zip (it uses "ad2")

Otherwise I'll try to get a release out today or tomorrow now that I finally was able to migrate to the new JS plugin.

sudhirkhanger commented 4 years ago

This ad2 build shows only one entry which goes to Kotlin. It is working as expected at least for me.