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

Annotation class does not have a (source) link in HTML #2958

Closed
aSemy opened this issue Apr 5, 2023 · 4 comments
Closed

Annotation class does not have a (source) link in HTML #2958

aSemy opened this issue Apr 5, 2023 · 4 comments
Labels

Comments

@aSemy
Copy link
Contributor

aSemy commented Apr 5, 2023

Describe the bug

I've configured a source link for my project (using Gradle + Dokkatoo)

// build.gradle.kts

dokkatoo {
  // ...
  dokkatooSourceSets.configureEach {
    sourceLink {
      localDirectory.set(file("src/main/kotlin"))
      val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: ""
      remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin")
    }
  }
}

The source link is correctly generated for all classes/functions/etc, except not for annotation classes.

Expected behaviour

Screenshots

For a regular class the (source) link is visible on the righthand-side:

image

However, it there is no (source) link for an annotation class:

image

To Reproduce

Dokka configuration

Module configuration

{
  "moduleName": "dokkatoo-plugin",
  "moduleVersion": "1.0.1-SNAPSHOT",
  "outputDir": "/projects/dokkatoo/modules/dokkatoo-plugin/build/dokka",
  "offlineMode": false,
  "failOnWarning": false,
  "sourceSets": [
    {
      "sourceSetID": {
        "scopeId": ":modules:dokkatoo-plugin:prepareDokkatooModuleDescriptorHtml",
        "sourceSetName": "DokkatooInternalApi"
      },
      "displayName": "jvm",
      "classpath": [
      ],
      "sourceRoots": [
        "/projects/dokkatoo/modules/dokkatoo-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt"
      ],
      "dependentSourceSets": [
      ],
      "samples": [
      ],
      "includes": [
      ],
      "reportUndocumented": false,
      "skipEmptyPackages": true,
      "skipDeprecated": false,
      "jdkVersion": 11,
      "sourceLinks": [
        {
          "localDirectory": "/projects/dokkatoo/modules/dokkatoo-plugin/src/main/kotlin",
          "remoteUrl": "https://github.com/adamko-dev/dokkatoo/tree/main/modules/dokkatoo-plugin/src/main/kotlin",
          "remoteLineSuffix": "#L"
        }
      ],
      "perPackageOptions": [
      ],
      "externalDocumentationLinks": [
        {
          "url": "https://docs.oracle.com/en/java/javase/11/docs/api/",
          "packageListUrl": "https://docs.oracle.com/en/java/javase/11/docs/api/element-list"
        },
        {
          "url": "https://kotlinlang.org/api/latest/jvm/stdlib/",
          "packageListUrl": "https://kotlinlang.org/api/latest/jvm/stdlib/package-list"
        }
      ],
      "noStdlibLink": false,
      "noJdkLink": false,
      "suppressedFiles": [
      ],
      "analysisPlatform": "jvm",
      "documentedVisibilities": [
        "INTERNAL"
      ]
    },
    {
      "sourceSetID": {
        "scopeId": ":modules:dokkatoo-plugin:prepareDokkatooModuleDescriptorHtml",
        "sourceSetName": "main"
      },
      "displayName": "jvm",
      "classpath": [
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin/1.7.20/d08f039d97cd489e3fbf19e5f855deee35297bd4/kotlin-gradle-plugin-1.7.20-gradle71.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/gradle/4.0.1/b9123dfbc635d6b2ae0d1d497e54ce6ddb204e2a/gradle-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/dokka-core/1.8.10/96fecb6bd5b857ec95cd6f3ec7983f3776e62cf8/dokka-core-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/builder/4.0.1/15b68fa31a20c9cb981105913e6df499f064db7d/builder-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/aaptcompiler/4.0.1/7579690083a0c5f728b3715e4729154bbfd33f03/aaptcompiler-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.lint/lint-gradle-api/27.0.1/9f64963b928bf7448aa2750e66cefb085beac921/lint-gradle-api-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/gradle-api/4.0.1/fd184bd994cc0047b9353b3548645544b352d129/gradle-api-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-compiler-common/4.0.1/45126bcd8d415ea7bbe4cc434784b24f14be3ac1/databinding-compiler-common-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/manifest-merger/27.0.1/de404ba12ad2b6dd000209487e594c9f1296979a/manifest-merger-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/sdk-common/27.0.1/b17dd4434faa51c5bcae5c15a9c4d19077e515af/sdk-common-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.analytics-library/tracker/27.0.1/aa98760c9f8bb77b84744d756233ce5f6afd67b4/tracker-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/sdklib/27.0.1/c6ddf0399d70930644cca38fa17df09839bfaa76/sdklib-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/repository/27.0.1/98db9058a7f3ea335570747b02300c5d943f522b/repository-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.analytics-library/shared/27.0.1/e8392bf59b50b69a669e1a9f3372229a2f13ad53/shared-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.8.10/7c002ac41f547a82e81dfebd2a20577a738dbf3f/kotlin-stdlib-jdk8-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.7.10/165e600dfea6185cf5efa700756294cc4904dbeb/kotlin-reflect-1.7.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-json-jvm/1.5.0/f2355f60f5c027da0326c8af2d9c724d39aa0ce9/kotlinx-serialization-json-jvm-1.5.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-core-jvm/1.5.0/d701e8cccd443a7cc1a0bcac53432f2745dcdbda/kotlinx-serialization-core-jvm-1.5.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-model/1.7.20/ee10b25667d827bc6c2f2520fa43e1a5079ed151/kotlin-gradle-plugin-model-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.7.20/8159de6c79ac1c91fe2ecc488c30b27b2a8f5f1c/kotlin-gradle-plugin-api-1.7.20-gradle71.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.7.20/8159de6c79ac1c91fe2ecc488c30b27b2a8f5f1c/kotlin-gradle-plugin-api-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-tooling-core/1.7.20/19c84dd609449479dd647cfb8b885f6430501a21/kotlin-tooling-core-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.analytics-library/crash/27.0.1/543ada2d3f4d681505790cbbc705cd3464304275/crash-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/transform-api/2.0.0-deprecated-use-gradle-api/85bee1acea9e27152b920746c68133b30b11431/transform-api-2.0.0-deprecated-use-gradle-api.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build.jetifier/jetifier-processor/1.0.0-beta09/fb2a015ff56e24939a88593ac73b84e627864476/jetifier-processor-1.0.0-beta09.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/7.0/478006d07b7c561ae3a92ddc1829bca81ae0cdd1/asm-commons-7.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/7.0/18d4d07010c24405129a6dbb0e92057f8779fb9d/asm-util-7.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/7.0/4b310d20d6f1c6b7197a75f1b5d69f169bc8ac1f/asm-analysis-7.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/7.0/29bc62dcb85573af6e62e5b2d735ef65966c4180/asm-tree-7.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/7.0/d74d4ba0dee443f68fb2dcb7fcdb945a2cd89912/asm-7.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/4.9/ee9e9eaa0a35360dcfeac129ff4923215fd65904/jopt-simple-4.9.jar",
        "~/.gradle/caches/modules-2/files-2.1/net.sf.proguard/proguard-gradle/6.0.3/e5becf2356695a396b788110e386c38bad523bfc/proguard-gradle-6.0.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/bundletool/0.13.2/bb629ece022e5aa20cff66517e728c89f9667721/bundletool-0.13.2.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build.jetifier/jetifier-core/1.0.0-beta09/c98ee0e5579aed97e17f605a89b101115a2f5a61/jetifier-core-1.0.0-beta09.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java-util/3.10.0/a68c906db83e93babbb4024ce91e7441bb7598dd/protobuf-java-util-3.10.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.crypto.tink/tink/1.3.0-rc2/c7efb1ecc3b667b8a0789a1b019b06269037e19b/tink-1.3.0-rc2.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.analytics-library/protos/27.0.1/b0eb2f65155b033b34b2214d24ee4c1a55c87621/protos-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/aapt2-proto/4.0.1-6197926/8d80782449481fdb258c74eea76a739d7aa513d7/aapt2-proto-4.0.1-6197926.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.10.0/410b61dd0088aab4caa05739558d43df248958c9/protobuf-java-3.10.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.8.10/cb726a23c808a850a43e7d6b9d1ba91b02fe9f05/kotlin-stdlib-jdk7-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains/markdown-jvm/0.3.1/45084b8ac961f3c5247a2289058c7522af157876/markdown-jvm-0.3.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.10/6d5560a229477df9406943d5feda5618e98eb64c/kotlin-stdlib-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-native-utils/1.7.20/8e64e54cf3fb0c275b3f2f5a9276110fbb329f8f/kotlin-native-utils-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-project-model/1.7.20/8db9bd1b28e2fefd67727adecb96462f7d454a39/kotlin-project-model-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/builder-model/4.0.1/31651881299e35d8040b92b2dc13d0fa861d7ec/builder-model-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/builder-test-api/4.0.1/8a9a1fc09a94ba43a83c34456d8d150ce3591a76/builder-test-api-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.ddms/ddmlib/27.0.1/56c5d2bfc359ebf0836dbe4d444c9df811bd5523/ddmlib-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android/signflinger/4.0.1/12a1261923aea039b9ecc0983b05bd6b867264d3/signflinger-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android/zipflinger/4.0.1/b57ae10c6be9486bef6164085e2c7b041b98c03c/zipflinger-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.layoutlib/layoutlib-api/27.0.1/cc1c6634155a19ec9f2365f0b48e5916ecf56b5f/layoutlib-api-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/dvlib/27.0.1/1ae27de1c6f283d169aea24911fd1bef7a8e9c74/dvlib-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/common/27.0.1/62d59d2a0ee7d0cd7bbeba97ddce45f7898ec6c6/common-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/apkzlib/4.0.1/bba5765dbeea157cfb8d03abf577c9404cebbbfa/apkzlib-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/apksig/4.0.1/1d51b699fb84ad226c4a8253e3108d1b1fd2663f/apksig-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.squareup/javawriter/2.5.0/81241ff7078ef14f42ea2a8995fa09c096256e6b/javawriter-2.5.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk15on/1.56/4648af70268b6fdb24674fb1fd7c1fcc73db1231/bcpkix-jdk15on-1.56.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.56/a153c6f9744a3e9dd6feab5e210e1c9861362ec7/bcprov-jdk15on-1.56.jar",
        "~/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar",
        "~/.gradle/caches/modules-2/files-2.1/it.unimi.dsi/fastutil/7.2.0/5ad3a2bb04143f70aa0765fc29fc29571a7d6b34/fastutil-7.2.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.googlecode.json-simple/json-simple/1.1/5e303a03d04e6788dddfa3655272580ae0fc13bb/json-simple-1.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.jimfs/jimfs/1.1/8fbd0579dc68aba6186935cc1bee21d2f3e7ec1c/jimfs-1.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/28.1-jre/b0e91dcb6a44ffb6221b5027e12a5cb34b841145/guava-28.1-jre.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.tools/annotations/27.0.1/45964f66d43e7c1b7e584d5a840084cc7f3810b5/annotations-27.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.5.6/164343da11db817e81e24e0d9869527e069850c9/httpmime-4.5.6.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.6/1afe5621985efe90a92d0fbc9be86271efbe796f/httpclient-4.5.6.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.10/acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b/httpcore-4.4.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-common/4.0.1/cdca8698ee545b79d656a4f1eeb103f60fad3ed1/databinding-common-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.android.databinding/baseLibrary/4.0.1/75023e7dd74bbae2c67cbe5b4011f1c36c1cb7f3/baseLibrary-4.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4/4.5.3/f35db7e4b2446e4174ba6a73db7bd6b3e6bb5da1/antlr4-4.5.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/b1b6ea3b7e4aa4f492509a4952029cd8e48019ad/commons-io-2.4.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.googlecode.juniversalchardet/juniversalchardet/1.0.3/cd49678784c46aa8789c060538e0154013bb421b/juniversalchardet-1.0.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.squareup/javapoet/1.10.0/712c178d35185d8261295913c9f2a7d6867a6007/javapoet-1.10.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.5/f645ed69d595b24d4cf8b3fbb64cc505bede8829/gson-2.8.5.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/jaxb-runtime-2.3.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/net.sf.proguard/proguard-base/6.0.3/7135739d2d3834964c543ed21e2936ce34747aca/proguard-base-6.0.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jdom/jdom2/2.0.6/6f14738ec2e9dd0011e343717fa624a10f8aab64/jdom2-2.0.6.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.3.2/d1a0c5032570e0f64be6b4d9c90cdeb103129029/error_prone_annotations-2.3.2.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.json/json/20180813/8566b2b0391d9d4479ea225645c6ed47ef17fe41/json-20180813.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.10/a61b182458550492c12aee66157d7b524a63a5ec/kotlin-stdlib-common-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-util-io/1.7.20/6e11b33883defb7ca4b8bff8c5fe81e463803bc7/kotlin-util-io-1.7.20.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.12/84caa68576e345eb5e7ae61a0e5a9229eb100d7b/commons-compress-1.12.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.trove4j/trove4j/20160824/33c3e174a9c8368d93761d3d12712db18e903959/trove4j-20160824.jar",
        "~/.gradle/caches/modules-2/files-2.1/net.sf.kxml/kxml2/2.3.0/ccbc77a5fd907ef863c29f3596c6f54ffa4e9442/kxml2-2.3.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/2.8.1/eb2e8ab75598548cc8acf9a1ca227e480e01881e/checker-qual-2.8.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.3/ba035118bc8bac37d7eff77700720999acd9986d/j2objc-annotations-1.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.18/f7aa683ea79dc6681ee9fb95756c999acbb62f5d/animal-sniffer-annotations-1.18.jar",
        "~/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar",
        "~/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/4b95f4897fa13f2cd904aee711aeafc0c5295cd8/commons-codec-1.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/javax.xml.bind/jaxb-api/2.3.1/8531ad5ac454cc2deb9d4d32c40c4d7451939b5d/jaxb-api-2.3.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/txw2/2.3.1/a09d2c48d3285f206fafbffe0e50619284e92126/txw2-2.3.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.sun.istack/istack-commons-runtime/3.0.7/c197c86ceec7318b1284bffb49b54226ca774003/istack-commons-runtime-3.0.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jvnet.staxex/stax-ex/1.8/8cc35f73da321c29973191f2cf143d29d26a1df7/stax-ex-1.8.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.sun.xml.fastinfoset/FastInfoset/1.2.15/bb7b7ec0379982b97c62cd17465cb6d9155f68e8/FastInfoset-1.2.15.jar",
        "~/.gradle/caches/modules-2/files-2.1/javax.activation/javax.activation-api/1.2.0/85262acf3ca9816f9537ca47d5adeabaead7cb16/javax.activation-api-1.2.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.sun.activation/javax.activation/1.2.0/bf744c1e2776ed1de3c55c8dac1057ec331ef744/javax.activation-1.2.0.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.12.7/4605d2f4267388d02d810a3cea448a48371435a3/jackson-dataformat-xml-2.12.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.12.7/a974a4972c0ecd2206b045e387bea4713a5451b6/jackson-module-jaxb-annotations-2.12.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.12.7.1/48d6674adb5a077f2c04b42795e2e7624997b8b9/jackson-databind-2.12.7.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.12.7/2042461b754cd65ab2dd74a9f19f442b54625f19/jackson-annotations-2.12.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.12.7/4669a54b799c105572aa8de2a1ae0fe64a17745/jackson-core-2.12.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-kotlin/2.12.7/9dd38ab8f194300be73a0f1e13701b9b1e012337/jackson-module-kotlin-2.12.7.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.8.10/1e90b778ea4669b6bcbfaca57313665ddd804779/kotlin-reflect-1.8.10.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jsoup/jsoup/1.15.3/f6e1d8a8819f854b681c8eaa57fd59a42329e10c/jsoup-1.15.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.6.3/b2c2f0c8e99eac632a8db723b365bd59067cf7bd/kotlinx-coroutines-core-jvm-1.6.3.jar",
        "~/.gradle/caches/modules-2/files-2.1/com.fasterxml.woodstox/woodstox-core/6.2.4/16b9f8ab972e67eb21872ea2c40046249d543989/woodstox-core-6.2.4.jar",
        "~/.gradle/caches/modules-2/files-2.1/org.codehaus.woodstox/stax2-api/4.2.1/a3f7325c52240418c2ba257b103c3c550e140c83/stax2-api-4.2.1.jar",
        "~/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/2.3.2/8d49996a4338670764d7ca4b85a1c4ccf7fe665d/jakarta.xml.bind-api-2.3.2.jar",
        "~/.gradle/caches/modules-2/files-2.1/jakarta.activation/jakarta.activation-api/1.2.1/562a587face36ec7eff2db7f2fc95425c6602bc1/jakarta.activation-api-1.2.1.jar"
      ],
      "sourceRoots": [
        "/projects/dokkatoo/modules/dokkatoo-plugin/src/main/kotlin",
        "/projects/dokkatoo/modules/dokkatoo-plugin/build/generated-source/main/kotlin"
      ],
      "dependentSourceSets": [
      ],
      "samples": [
      ],
      "includes": [
      ],
      "reportUndocumented": false,
      "skipEmptyPackages": true,
      "skipDeprecated": false,
      "jdkVersion": 11,
      "sourceLinks": [
        {
          "localDirectory": "/projects/dokkatoo/modules/dokkatoo-plugin/src/main/kotlin",
          "remoteUrl": "https://github.com/adamko-dev/dokkatoo/tree/main/modules/dokkatoo-plugin/src/main/kotlin",
          "remoteLineSuffix": "#L"
        }
      ],
      "perPackageOptions": [
      ],
      "externalDocumentationLinks": [
        {
          "url": "https://docs.oracle.com/en/java/javase/11/docs/api/",
          "packageListUrl": "https://docs.oracle.com/en/java/javase/11/docs/api/element-list"
        },
        {
          "url": "https://kotlinlang.org/api/latest/jvm/stdlib/",
          "packageListUrl": "https://kotlinlang.org/api/latest/jvm/stdlib/package-list"
        }
      ],
      "noStdlibLink": false,
      "noJdkLink": false,
      "suppressedFiles": [
      ],
      "analysisPlatform": "jvm",
      "documentedVisibilities": [
        "PUBLIC"
      ]
    }
  ],
  "pluginsClasspath": [
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/dokka-analysis/1.8.10/b5c1a8c889b8365d958b80b651c41899cd884ab2/dokka-analysis-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/templating-plugin/1.8.10/ca87227ea74caba8be6da884d8d85f260f350796/templating-plugin-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/dokka-base/1.8.10/cda21a227befac4cd8489beedeb6712652f6d1f2/dokka-base-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/kotlin-analysis-intellij/1.8.10/3d880518049c200e67fd1e00d35053b387794950/kotlin-analysis-intellij-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/kotlin-analysis-compiler/1.8.10/13b61c228c37956d12b75c61fad65c2aa5649495/kotlin-analysis-compiler-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.freemarker/freemarker/2.3.31/cd4fc0942b4a8bdb19f3b669aa42136fb54feb55/freemarker-2.3.31.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-html-jvm/0.8.0/358843421bbfad3638ea230cfcc155af1e277cfa/kotlinx-html-jvm-0.8.0.jar"
  ],
  "pluginsConfiguration": [
    {
      "fqPluginName": "org.jetbrains.dokka.base.DokkaBase",
      "serializationFormat": "JSON",
      "values": "{\"customAssets\":[],\"customStyleSheets\":[],\"separateInheritedMembers\":false,\"mergeImplicitExpectActualDeclarations\":false}"
    },
    {
      "fqPluginName": "org.jetbrains.dokka.versioning.VersioningPlugin",
      "serializationFormat": "JSON",
      "values": "{\"versionsOrdering\":[],\"olderVersions\":[],\"renderVersionsNavigationOnAllPages\":true}"
    }
  ],
  "delayTemplateSubstitution": false,
  "suppressObviousFunctions": true,
  "includes": [
  ],
  "suppressInheritedMembers": false,
  "finalizeCoroutines": false,
  "modulesKxs": [
  ]
}

Publication configuration

{
  "moduleName": "Dokkatoo Gradle Plugin",
  "moduleVersion": "1.0.1-SNAPSHOT",
  "outputDir": "/projects/dokkatoo/docs/build/dokka",
  "offlineMode": false,
  "failOnWarning": false,
  "sourceSets": [
  ],
  "pluginsClasspath": [
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/dokka-analysis/1.8.10/b5c1a8c889b8365d958b80b651c41899cd884ab2/dokka-analysis-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/templating-plugin/1.8.10/ca87227ea74caba8be6da884d8d85f260f350796/templating-plugin-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/dokka-base/1.8.10/cda21a227befac4cd8489beedeb6712652f6d1f2/dokka-base-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/kotlin-analysis-intellij/1.8.10/3d880518049c200e67fd1e00d35053b387794950/kotlin-analysis-intellij-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/kotlin-analysis-compiler/1.8.10/13b61c228c37956d12b75c61fad65c2aa5649495/kotlin-analysis-compiler-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.freemarker/freemarker/2.3.31/cd4fc0942b4a8bdb19f3b669aa42136fb54feb55/freemarker-2.3.31.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.dokka/all-modules-page-plugin/1.8.10/66b7ee213d3f9d3ce879998c5aa5b6e21fc356f7/all-modules-page-plugin-1.8.10.jar",
    "~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-html-jvm/0.8.0/358843421bbfad3638ea230cfcc155af1e277cfa/kotlinx-html-jvm-0.8.0.jar"
  ],
  "pluginsConfiguration": [
    {
      "fqPluginName": "org.jetbrains.dokka.base.DokkaBase",
      "serializationFormat": "JSON",
      "values": "{\"customAssets\":[\"/projects/dokkatoo/docs/images/logo-icon.svg\"],\"customStyleSheets\":[\"/projects/dokkatoo/docs/style/logo-styles.css\"],\"separateInheritedMembers\":false,\"mergeImplicitExpectActualDeclarations\":false}"
    },
    {
      "fqPluginName": "org.jetbrains.dokka.versioning.VersioningPlugin",
      "serializationFormat": "JSON",
      "values": "{\"versionsOrdering\":[],\"olderVersions\":[],\"renderVersionsNavigationOnAllPages\":true}"
    }
  ],
  "delayTemplateSubstitution": false,
  "suppressObviousFunctions": true,
  "includes": [
  ],
  "suppressInheritedMembers": false,
  "finalizeCoroutines": false,
  "modulesKxs": [
    {
      "name": "dokkatoo-plugin",
      "sourceOutputDirectory": "/projects/dokkatoo/modules/dokkatoo-plugin/build/dokka-module/html",
      "includes": [
      ],
      "modulePath": "modules/dokkatoo-plugin"
    }
  ]
}

Installation

  • Operating system: macOS
  • Build tool: Gradle v7.6.1
  • Dokka version: 1.8.10

Additional context

Possibly related to #2642?

@aSemy aSemy added the bug label Apr 5, 2023
@aSemy aSemy changed the title Annotation class does not have a (source) link Annotation class does not have a (source) link in HTML Apr 5, 2023
@IgnatBeresnev
Copy link
Member

This looks to be a configuration bug of some sort. I now really wish #2873 was implemented...

Building the docs for the following code

annotation class MyAnnotation {}

With the following configuration

tasks.withType<DokkaTask>().configureEach {
    dokkaSourceSets.configureEach {
        sourceLink {
            localDirectory.set(file("src/main/kotlin"))
            remoteUrl.set(
                URL(
                    "https://github.com/IgnatBeresnev/dokka-debug-kts/tree/master/src/main/kotlin"
                )
            )
            remoteLineSuffix.set("#L")
        }
    }
}

I'm unable to reproduce it:

screenshot

2023-04-06_21-46-40

And there's a test for source links that has an annotation class as input:

fun `source link should lead to name`() {

@aSemy
Copy link
Contributor Author

aSemy commented Apr 6, 2023

This looks to be a configuration bug of some sort.

Ahh okay, that is quite possible. Thanks for checking. I actually skipped out some details that I realise now might be relevant.

I made a special source set only for the custom opt-in annotation, because it was marked as internal. I wanted this annotation to be included in the Dokka publication, but I didn't want to include all internal code.

dokkatoo {
  dokkatooSourceSets.register("DokkatooInternalApi") {
    // create a special source set just for documenting the internally visible DokkatooInternalApi
    documentedVisibilities(INTERNAL)
    sourceRoots.from(layout.projectDirectory.dir("src/main/kotlin").asFileTree.matching {
      include("**/DokkatooInternalApi.kt")
    })
  }

  dokkatooSourceSets.configureEach {
    sourceLink {
      localDirectory.set(file("src/main/kotlin"))
      val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: ""
      remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin")
    }
  }
}

So maybe there's some issue with the source links when there are multiple source links...?

Anyway, as I was writing this up I realised that making the annotation internal means that no-one can opt into it! So in this instance I'll just make the annotation public and remove the custom source set. Everything works then.

I now really wish #2873 was implemented...

The DokkaParametersKxs JSON above should be close enough :)

@aSemy aSemy closed this as completed Apr 6, 2023
@IgnatBeresnev
Copy link
Member

So maybe there's some issue with the source links when there are multiple source links...?

quite possibly, yes

sources[sg.dci.dri.singleOrNull()]?.let { sourceLinks ->

The DokkaParametersKxs JSON above should be close enough :)

Yeah, but I don't know how the current plugin configured it so that we can compare old and new, and I don't want to go into debugging if I don't have to 😅

@IgnatBeresnev
Copy link
Member

I wanted this annotation to be included in the Dokka publication, but I didn't want to include all internal code.

Placing it in a different package and configuring the visibility with perPackageOptions could also work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants