Skip to content

Commit f937bf6

Browse files
authored
Merge pull request #506 from thisisthepy/feat/klib-fixture-u4a
Test: klib fixture pins the generic and suspend members bound since #492/#494
2 parents 705daf0 + 823c4fd commit f937bf6

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

‎python-multiplatform-gradle-plugin/fixtures/klib-artifact/src/nativeTest/kotlin/fixture/artifact/WalkedKlibArtifactTableTest.kt‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ class WalkedKlibArtifactTableTest {
5858
* The fixed text: everything `KlibScanner` bound out of the whole `kotlinx-coroutines-core` klib
5959
* under the `kotlinx.coroutines` namespace. Zero before issue #234, when no Kotlin object could
6060
* cross the klib boundary; since then the factories whose types are the klib's own classes, and
61-
* since #237 the members of its interfaces and final classes.
61+
* since #237 the members of its interfaces and final classes, and since SPEC U-4a and B-1 (#164) the
62+
* members of its generic classes and interfaces (read with `kotlin.Any?` for the type parameter) and
63+
* its `suspend` members (`Job.join`, `SendChannel.send`, `Semaphore.acquire`, ...).
6264
* `KlibScannerTest.aRealThirdPartyKlibIsScannedWithoutCrashingAndBindsItsHandleFactoriesAndMembers` pins the
6365
* same list walking the klib directly; if the two disagree, the wiring between `KlibScanner` and
6466
* this generated table is what broke.
@@ -68,7 +70,13 @@ class WalkedKlibArtifactTableTest {
6870
ArtifactTable.registerInto()
6971
assertEquals(
7072
listOf(
73+
"kotlinx.coroutines.AbstractCoroutine.isActive",
74+
"kotlinx.coroutines.CancellableContinuation.initCancellability",
75+
"kotlinx.coroutines.CancellableContinuation.isActive",
76+
"kotlinx.coroutines.CancellableContinuation.isCancelled",
77+
"kotlinx.coroutines.CancellableContinuation.isCompleted",
7178
"kotlinx.coroutines.CloseableCoroutineDispatcher.close",
79+
"kotlinx.coroutines.CompletableDeferred.complete",
7280
"kotlinx.coroutines.CompletableJob.complete",
7381
"kotlinx.coroutines.CoroutineDispatcher.Key",
7482
"kotlinx.coroutines.CoroutineDispatcher.limitedParallelism",
@@ -77,6 +85,8 @@ class WalkedKlibArtifactTableTest {
7785
"kotlinx.coroutines.CoroutineName.Key",
7886
"kotlinx.coroutines.CoroutineName.name",
7987
"kotlinx.coroutines.CoroutineStart.isLazy",
88+
"kotlinx.coroutines.Deferred.await",
89+
"kotlinx.coroutines.Deferred.getCompleted",
8090
"kotlinx.coroutines.Dispatchers.Default",
8191
"kotlinx.coroutines.Dispatchers.Main",
8292
"kotlinx.coroutines.Dispatchers.Unconfined",
@@ -87,6 +97,7 @@ class WalkedKlibArtifactTableTest {
8797
"kotlinx.coroutines.Job.isActive",
8898
"kotlinx.coroutines.Job.isCancelled",
8999
"kotlinx.coroutines.Job.isCompleted",
100+
"kotlinx.coroutines.Job.join",
90101
"kotlinx.coroutines.Job.onJoin",
91102
"kotlinx.coroutines.Job.parent",
92103
"kotlinx.coroutines.Job.start",
@@ -104,21 +115,38 @@ class WalkedKlibArtifactTableTest {
104115
"kotlinx.coroutines.channels.Channel.Factory.DEFAULT_BUFFER_PROPERTY_NAME",
105116
"kotlinx.coroutines.channels.Channel.Factory.RENDEZVOUS",
106117
"kotlinx.coroutines.channels.Channel.Factory.UNLIMITED",
118+
"kotlinx.coroutines.channels.ChannelIterator.hasNext",
119+
"kotlinx.coroutines.channels.ChannelIterator.next",
107120
"kotlinx.coroutines.channels.ChannelResult.Companion",
121+
"kotlinx.coroutines.channels.ReceiveChannel.isClosedForReceive",
122+
"kotlinx.coroutines.channels.ReceiveChannel.isEmpty",
123+
"kotlinx.coroutines.channels.ReceiveChannel.receive",
124+
"kotlinx.coroutines.channels.SendChannel.isClosedForSend",
125+
"kotlinx.coroutines.channels.SendChannel.send",
108126
"kotlinx.coroutines.ensureActive__CoroutineScope",
109127
"kotlinx.coroutines.ensureActive__Job",
110128
"kotlinx.coroutines.flow.DEFAULT_CONCURRENCY",
111129
"kotlinx.coroutines.flow.DEFAULT_CONCURRENCY_PROPERTY_NAME",
130+
"kotlinx.coroutines.flow.FlowCollector.emit",
131+
"kotlinx.coroutines.flow.MutableSharedFlow.emit",
132+
"kotlinx.coroutines.flow.MutableSharedFlow.resetReplayCache",
133+
"kotlinx.coroutines.flow.MutableSharedFlow.tryEmit",
134+
"kotlinx.coroutines.flow.MutableStateFlow.compareAndSet",
135+
"kotlinx.coroutines.flow.MutableStateFlow.value",
136+
"kotlinx.coroutines.flow.MutableStateFlow.value=",
112137
"kotlinx.coroutines.flow.SharingStarted.Companion",
113138
"kotlinx.coroutines.flow.SharingStarted.Eagerly",
114139
"kotlinx.coroutines.flow.SharingStarted.Lazily",
115140
"kotlinx.coroutines.flow.SharingStarted.WhileSubscribed",
141+
"kotlinx.coroutines.flow.StateFlow.value",
116142
"kotlinx.coroutines.isActive",
117143
"kotlinx.coroutines.newFixedThreadPoolContext",
118144
"kotlinx.coroutines.newSingleThreadContext",
145+
"kotlinx.coroutines.selects.SelectInstance.disposeOnCompletion",
119146
"kotlinx.coroutines.sync.Mutex",
120147
"kotlinx.coroutines.sync.Mutex.isLocked",
121148
"kotlinx.coroutines.sync.Semaphore",
149+
"kotlinx.coroutines.sync.Semaphore.acquire",
122150
"kotlinx.coroutines.sync.Semaphore.availablePermits",
123151
"kotlinx.coroutines.sync.Semaphore.release",
124152
"kotlinx.coroutines.sync.Semaphore.tryAcquire",

0 commit comments

Comments
 (0)