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

dokkaJavadoc task reports Could not recognize JavadocContentGroup in SamplesTransformer for samples #3466

Closed
atyrin opened this issue Jan 23, 2024 · 0 comments · Fixed by #3473
Assignees
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general regression An issue/bug that appeared after recent changes
Milestone

Comments

@atyrin
Copy link
Contributor

atyrin commented Jan 23, 2024

In Kotlin/JVM project declare

/**
 * @sample [sample]
 */
class Test {
}

fun sample(){
    val a = 0
}

Run dokkaJavadoc and get:

Could not recognize JavadocContentGroup(dri=[/Test///PointingToDeclaration/], kind=Class, sourceSets=[DisplaySourceSet(sourceSetIDs=CompositeSourceSetID(children=[:module1:dokkaJavadoc/main]), name=jvm, platform=jvm)], children=[TitleNode(title=Test, subtitle=[], version=1.0-SNAPSHOT, parent=, dri=[/Test///PointingToDeclaration/], kind=Class, sourceSets=[DisplaySourceSet(sourceSetIDs=CompositeSourceSetID(children=[:module1:dokkaJavadoc/main]), name=jvm, platform=jvm)])]) ContentNode in SamplesTransformer

Installation

  • Dokka version: 1.9.20

I don't see such error for 1.9.10. The task outputs for 1.9.10/1.9.20 are equivalent.

@atyrin atyrin added bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general labels Jan 23, 2024
@IgnatBeresnev IgnatBeresnev added the regression An issue/bug that appeared after recent changes label Jan 24, 2024
vmishenev added a commit that referenced this issue Jan 25, 2024
This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.
@vmishenev vmishenev linked a pull request Jan 25, 2024 that will close this issue
vmishenev added a commit that referenced this issue Jan 25, 2024
This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.
vmishenev added a commit that referenced this issue Jan 25, 2024
This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.
vmishenev added a commit that referenced this issue Jan 30, 2024
* [Javadoc] Ignore Kotlin samples

This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.
IgnatBeresnev pushed a commit that referenced this issue Jan 31, 2024
* [Javadoc] Ignore Kotlin samples

This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.

(cherry picked from commit e502b2c)
vmishenev added a commit that referenced this issue Mar 20, 2024
* [Javadoc] Ignore Kotlin samples

This is a laconic solution to avoid an error message (#3466) for Kotlin samples in unstable Javadoc format. There are 2 problems.
1. Javadoc's content model does not contain samples links at all. It should contain something like `samplesSectionContent` in the base plugin.
2. Sample Transformer from the base plugin knows nothing about Javadoc's content model. see  `DefaultSamplesTransformer.dfs`, e.g. `JavadocContentGroup` is unavailable from the base plugin.
@IgnatBeresnev IgnatBeresnev added this to the Dokka 1.9.20 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general regression An issue/bug that appeared after recent changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants