Hi all! is there a plan to have <https://github.co...
# dokka
m
Hi all! is there a plan to have https://github.com/Kotlin/dokka/pull/2901 or similar fix incorporated within Dokka? the referenced PR seems namely to address the issue in case multiple modules have the same package name that the wrong links are established.
j
I've seen this bug in my Dokka generated docs. I hadn't had a chance to look into it yet. Good to see there's a proposed fix.
My library is probably an extreme example of these situations because there are both community and enterprise edition modules that largely share most of the same APIs in the same packages. The modules do not depend on one another and are completely separate, other than being published together and submodules in the same multimodule project. I've seen some other bugs in the dokka output that could also be related.
i
Hi! Yes, we do plan to get to it at some point, but we need to have a close look at the changes and the code around it as I don't understand the majority of what's going on there, and it feels scary to just merge it as is - don't want to introduce a bunch of other more serious bugs
e
I would also appreciate if that fix can be merged in some form, as we can't really adopt Dokka until the issue is resolved. Plus it'd mean one less PR I have to keep tabs on. 🙂 @Ignat Beresnev Please let me know if there's anything I can do to help move it along. It's been a while now, but I'll try to clarify it a bit. The change just ensures Dokka picks a path that exists when you have multiple modules and overlapping package names. For example, a feature that's split into separate modules for
presentation
,
ui
, etc., each having a source set that contributes to the same package name
com.example.feature1
. This change makes it so that a reference to
com.example.feature1.FeatureView
correctly resolves to the
ui
module's generated docs rather than `presentation`'s. IIRC the change didn't break any other test, so if you're concerned about this breaking something, I suppose that's a good opportunity to add more test cases.
j
I checked out your fixed branch and merged the latest changes from dokka/master and built a maven local 1.9.0-SNAPSHOT. I can confirm this fix does resolve the problem I saw in my docs with some links linking to a different module that's not a dependency, but shares much of the same API. The one I remembered and tested was actually broken before, as it was linking to
wrong-module/package/-function-name/index.html
instead of
wrong-module/package/-function-name.html
. It now correctly links to
same-correct-module/package/-function-name.html
.
It doesn't fix several other bugs I've noted with my docs though, including missing source sets and APIs. I'll document and report those separately. It'll be easier to debug once I've released my library soon.