Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr3zee committed Jun 18, 2024
1 parent fc31b22 commit 6825315
Showing 1 changed file with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.runBlocking
import kotlinx.rpc.client.withService
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import java.time.LocalDate

interface MainService : RPC, EmptyService {
@RPCEagerField
Expand All @@ -29,28 +23,6 @@ interface MainService : RPC, EmptyService {
override suspend fun empty()
}

@Serializable(with = LocalDateSerializer::class)
@JvmInline
value class LocalDateValue(val value: LocalDate)

class LocalDateSerializer : KSerializer<LocalDateValue> {
override fun deserialize(decoder: Decoder): LocalDateValue {
TODO("Not yet implemented")
}

override val descriptor: SerialDescriptor
get() = TODO("Not yet implemented")

override fun serialize(encoder: Encoder, value: LocalDateValue) {
TODO("Not yet implemented")
}
}

interface DatabaseAbsenceRPC : RPC {
// ...
suspend fun getAbsences(date: LocalDateValue)
}

interface FieldOnly : RPC {
val flow: Flow<Int>
}
Expand All @@ -60,7 +32,5 @@ fun main(): Unit = runBlocking {
testService<CommonService>()
testService<RootService>()

stubEngine.withService<DatabaseAbsenceRPC>().apply {
getAbsences(LocalDateValue(LocalDate.now()))
}
stubEngine.withService<FieldOnly>().flow
}

0 comments on commit 6825315

Please sign in to comment.