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
Do not generate source links for synthetic elements #2547
Conversation
plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
Outdated
Show resolved
Hide resolved
7511939
to
0f95b13
Compare
context.plugin<DokkaBase>().querySingle { commentsToContentConverter }, | ||
context.plugin<DokkaBase>().querySingle { signatureProvider }, | ||
context.logger | ||
) | ||
|
||
override fun invoke(input: RootPageNode) = | ||
input.transformContentPagesTree { node -> | ||
override fun invoke(input: RootPageNode): RootPageNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of refactoring to make it not run if sources are not configured and to not parse configuration on every documentable
@@ -85,7 +85,7 @@ abstract class AbstractTest<M : TestMethods, T : TestBuilder<M>, D : DokkaTestGe | |||
}.toSet(), | |||
sourceLinks = sourceSet.sourceLinks.map { link -> | |||
link.copy( | |||
localDirectory = testDirPath.toFile().resolve(link.localDirectory).canonicalPath | |||
localDirectory = testDirPath.toFile().resolve(link.localDirectory).absolutePath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with paths was here. canonicalPath
resolves symlinks, while absolutePath
does not, so on windows it resulted in two different temp folder locations.
I'll refactor this bit later on in a separate PR once I get a hold of a windows machine
Fixes #2544