Use both macos targets in ui-showcase
TL;DR;
This is needed because of the issue with rendering expect/actual. I would propose for now to just add macosArm64 target and resolve underlying issue during implementation of https://github.com/Kotlin/dokka/issues/3386 for Dokka K2. We will anyway need to do something with such sourceSets.
In https://github.com/Kotlin/dokka/pull/3662 test started to fail on ui-showcase module because of ERROR CLASS.
Checking the page where the fail happened, I found that for some reason ui-showcase currently (on master) doesn't contain an actual declaration for macos sourceSet:
asyncWithDelay doesn't have macos tab, but actual declaration exists in sourceSet.
If we run the same test with the changes from https://github.com/Kotlin/dokka/pull/3662, macos tab is now appeared but shows ERROR CLASS:
All other declarations of
asyncWithDelay for other sourceSets look the same as before.
Also, other declarations (which don't depend on coroutines) like getCurrentDate which also has expect/actual defined in the same - work fine on master and macos tab exist:
Most probably the issue is very similar to https://github.com/Kotlin/dokka/issues/3386 (even though problem described here reproducible on K1).
If we build ui-showcase with Dokka K2:
- on
master-linuxandmacosare not shown at all forasyncWithDelay. - with https://github.com/Kotlin/dokka/pull/3662 - all source sets are shown but both
linuxandmacoswill showERROR CLASS - if we add
macosArm64target (as in this PR) -macossource set will be shown.
Currently, does the linux tab have <ERROR CLASS>.asyncWithDelay... for K2, but K1 renders normally?
Yeah, for K1 linux renders fine for some reason with K1. With K2 it will be ERROR CLASS. May be because coroutines does have some apple/macos related stuff in publication which confuses Dokka with K1
Can we fix it with an extra target as well?
Probably yes, I will recheck it one more time for both K1 and K2 and adapt PR
Adding extra linuxArm64 target not only solves ERROR CLASS for asyncWithDelay but also resolves issue with CPointer for K2 - so now, ui-showcase works for both K1 and K2.