mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-18 09:32:23 +08:00
[core] Move structureToString from .core.utils.debug
to .core.utils
due to compiler bug.
This commit is contained in:
parent
965ab57aaa
commit
f4db93745d
@ -9,9 +9,8 @@
|
||||
|
||||
@file:JvmName("StructureToStringTransformerKt_common")
|
||||
|
||||
package net.mamoe.mirai.utils.debug
|
||||
package net.mamoe.mirai.utils
|
||||
|
||||
import net.mamoe.mirai.utils.loadService
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
public interface StructureToStringTransformer {
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.debug
|
||||
package net.mamoe.mirai.utils
|
||||
|
||||
internal actual fun getPlatformDefaultStructureToStringTransformer(): StructureToStringTransformer? {
|
||||
return StructureToStringTransformerLegacy()
|
@ -7,10 +7,9 @@
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.debug
|
||||
package net.mamoe.mirai.utils
|
||||
|
||||
import kotlinx.serialization.Transient
|
||||
import net.mamoe.mirai.utils.toUHexString
|
||||
import java.lang.reflect.Modifier
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.reflect.KProperty
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.debug
|
||||
package net.mamoe.mirai.utils
|
||||
|
||||
internal actual fun getPlatformDefaultStructureToStringTransformer(): StructureToStringTransformer? {
|
||||
return null
|
@ -40,7 +40,6 @@ import net.mamoe.mirai.internal.utils.C2CPkgMsgParsingCache
|
||||
import net.mamoe.mirai.message.MessageReceipt
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import kotlin.contracts.contract
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
|
@ -19,9 +19,9 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.NotOnlineImageExtPb
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.message.data.Image
|
||||
import net.mamoe.mirai.message.data.ImageType
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.generateImageId
|
||||
import net.mamoe.mirai.utils.generateImageIdFromResourceId
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
internal sealed interface OnlineImage : Image, ConstOriginUrlAware {
|
||||
override val originUrl: String
|
||||
|
@ -45,7 +45,6 @@ import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.message.data.visitor.RecursiveMessageVisitor
|
||||
import net.mamoe.mirai.message.data.visitor.accept
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
internal interface MessageProtocolFacade {
|
||||
|
@ -17,7 +17,6 @@ import net.mamoe.mirai.internal.pipeline.*
|
||||
import net.mamoe.mirai.message.data.Message
|
||||
import net.mamoe.mirai.message.data.MessageSourceKind
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToStringAndDesensitizeIfAvailable
|
||||
import kotlin.coroutines.RestrictsSuspension
|
||||
|
||||
internal interface MessageDecoderPipeline :
|
||||
|
@ -37,9 +37,9 @@ import net.mamoe.mirai.message.data.MessageSourceKind
|
||||
import net.mamoe.mirai.message.data.OnlineMessageSource
|
||||
import net.mamoe.mirai.message.data.visitor.MessageVisitor
|
||||
import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.encodeBase64
|
||||
import net.mamoe.mirai.utils.mapToIntArray
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(OnlineMessageSourceFromFriendImpl.Serializer::class)
|
||||
|
@ -21,7 +21,6 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.OnlinePushTrans
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.Structmsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.NewContact
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
|
||||
internal class UnconsumedNoticesAlerter(
|
||||
logger: MiraiLogger,
|
||||
|
@ -30,7 +30,6 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.TroopTips0x857
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.parseToMessageDataList
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
internal class GroupNotificationProcessor(
|
||||
|
@ -36,8 +36,8 @@ import net.mamoe.mirai.internal.utils.parseToMessageDataList
|
||||
import net.mamoe.mirai.internal.utils.toMemberInfo
|
||||
import net.mamoe.mirai.utils.MiraiLogger
|
||||
import net.mamoe.mirai.utils.context
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.read
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,6 @@ import net.mamoe.mirai.internal.network.protocol.packet.list.FriendList.GetFrien
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
|
||||
/**
|
||||
* All [FriendEvent] except [FriendMessageEvent]
|
||||
|
@ -35,7 +35,7 @@ import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.message.data.PlainText
|
||||
import net.mamoe.mirai.message.data.buildMessageChain
|
||||
import net.mamoe.mirai.utils.context
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
/**
|
||||
* @see OtherClientOnlineEvent
|
||||
|
@ -19,9 +19,9 @@ import net.mamoe.mirai.internal.utils.io.NestedStructureDesensitizer
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.debug.structureToStringIfAvailable
|
||||
import net.mamoe.mirai.utils.inflate
|
||||
import net.mamoe.mirai.utils.isSameType
|
||||
import net.mamoe.mirai.utils.structureToStringIfAvailable
|
||||
import kotlin.jvm.JvmField
|
||||
|
||||
@Serializable
|
||||
|
@ -22,8 +22,8 @@ import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.md5
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
internal class MessageValidationData(
|
||||
val data: ByteArray,
|
||||
|
@ -43,7 +43,6 @@ import net.mamoe.mirai.internal.network.protocol.packet.*
|
||||
import net.mamoe.mirai.internal.utils.NetworkType
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.*
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
|
||||
@Suppress("EnumEntryName", "unused")
|
||||
internal enum class RegPushReason {
|
||||
|
@ -25,7 +25,7 @@ import net.mamoe.mirai.internal.network.protocol.packet.login.wtlogin.orEmpty
|
||||
import net.mamoe.mirai.internal.utils.crypto.TEA
|
||||
import net.mamoe.mirai.internal.utils.printStructure
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
internal class WtLogin {
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@ import net.mamoe.mirai.internal.message.contextualBugReportException
|
||||
import net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext
|
||||
import net.mamoe.mirai.internal.network.components.NoticeProcessor
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.debug.structureToStringAndDesensitizeIfAvailable
|
||||
import net.mamoe.mirai.utils.structureToStringAndDesensitizeIfAvailable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
internal interface Processor<C : ProcessorPipelineContext<D, *>, D> : PipelineConsumptionMarker {
|
||||
|
@ -13,8 +13,8 @@ package net.mamoe.mirai.internal.utils
|
||||
|
||||
import net.mamoe.mirai.utils.MiraiLogger
|
||||
import net.mamoe.mirai.utils.debug
|
||||
import net.mamoe.mirai.utils.debug.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
|
||||
|
||||
private val SoutvLogger: MiraiLogger by lazy {
|
||||
|
@ -16,7 +16,7 @@ import net.mamoe.mirai.internal.message.DeepMessageRefiner.refineDeep
|
||||
import net.mamoe.mirai.internal.message.SimpleRefineContext
|
||||
import net.mamoe.mirai.internal.test.runBlockingUnit
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
@ -20,7 +20,7 @@ import net.mamoe.mirai.internal.test.AbstractTest
|
||||
import net.mamoe.mirai.message.MessageSerializers
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.utils.cast
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
import net.mamoe.mirai.utils.mapToByteArray
|
||||
import kotlin.test.*
|
||||
|
||||
|
@ -16,7 +16,7 @@ import net.mamoe.mirai.message.MessageSerializers
|
||||
import net.mamoe.mirai.message.data.MessageChain.Companion.serializeToJsonString
|
||||
import net.mamoe.mirai.message.data.SingleMessage
|
||||
import net.mamoe.mirai.message.data.messageChainOf
|
||||
import net.mamoe.mirai.utils.debug.structureToStringIfAvailable
|
||||
import net.mamoe.mirai.utils.structureToStringIfAvailable
|
||||
import kotlin.test.assertNotNull
|
||||
import kotlin.test.asserter
|
||||
|
||||
|
@ -17,8 +17,8 @@ import net.mamoe.mirai.internal.testFramework.codegen.visitors.OptimizeByteArray
|
||||
import net.mamoe.mirai.internal.testFramework.codegen.visitors.renderToString
|
||||
import net.mamoe.mirai.internal.testFramework.desensitizer.DesensitizationVisitor
|
||||
import net.mamoe.mirai.internal.testFramework.desensitizer.Desensitizer
|
||||
import net.mamoe.mirai.utils.debug.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.debug.StructureToStringTransformerLegacy
|
||||
import net.mamoe.mirai.utils.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.StructureToStringTransformerLegacy
|
||||
|
||||
internal class StructureToStringTransformerNew : StructureToStringTransformer {
|
||||
private val legacy = StructureToStringTransformerLegacy()
|
||||
|
@ -11,8 +11,8 @@ package net.mamoe.mirai.internal.utils.test
|
||||
|
||||
import net.mamoe.mirai.internal.test.AbstractTest
|
||||
import net.mamoe.mirai.internal.utils.StructureToStringTransformerNew
|
||||
import net.mamoe.mirai.utils.debug.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.debug.structureToString
|
||||
import net.mamoe.mirai.utils.StructureToStringTransformer
|
||||
import net.mamoe.mirai.utils.structureToString
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertIs
|
||||
|
Loading…
Reference in New Issue
Block a user