Commit Graph

185 Commits

Author SHA1 Message Date
sandtechnology
cc7f35519e
Update login protocol (#2433)
* Update login protocol
Still need testing

* Turn off debug option and make t547 null when failed

* Fix wrong convert method and improve tips

* Remove unused part and improve tips

* Fix typo

* Inline resultStatus for performance

* Rename pow to PoW, the name should be "Proof of Work"

* Add shadow and deps-test for kt-bignum

* Try to fix deps-test

* Fix deps-test again
2023-01-18 17:41:21 +08:00
Karlatemp
c77ed79b12
[core] Encode html entities for forward message; fix #2241 2022-12-11 22:26:06 +08:00
Him188
60bbcf6e2c
[core] Revert "Review atomic calls and enable atomicfu compiler. Close #2315", due to atomicfu does not behave correctly when mirai-console depends on mirai-core-utils. Fixes #2329.
This commit reverts part of commit 564a7ce8f8
2022-11-27 20:08:21 +00:00
Him188
3360347ca2 [build] Fix dependency exclusion for builds when IDEA_ACTIVE 2022-11-27 15:25:18 +00:00
Him188
c0ccdbe9d3 [build] Rewrite shadow relocation 2022-11-27 15:25:18 +00:00
Him188
f24ca9628f
[core] Optimize array expansions 2022-11-02 19:29:02 +00:00
微莹·纤绫
4abb3e3703
[core] Introduce Flow<T>.toStream() for simply implement Streamable (#2259)
* [core] Introduce `Flow<T>.toStream()` for simply implement `Streamable`

* Drop `unintercepted` support

* fix ci

* update test
2022-10-31 13:09:58 +00:00
Him188
564a7ce8f8
[core] Review atomic calls and enable atomicfu compiler. Close #2315 2022-10-29 13:04:37 +01:00
Him188
1f8524fb04
Fix all compiler warnings throughout the project 2022-10-21 17:00:37 +01:00
Him188
25e66d19c7
[core] Filter out relocated ktor dependencies in runtime except for mirai-core-utils and mirai-core-all. Fix #2291 2022-10-21 16:09:27 +01:00
Him188
4d80e0e6d3
[core] Improve documentation on processor pipeline system. 2022-10-12 14:38:17 +01:00
Him188
2da0a2d6d3
[core] Fix relevant uses of Closeable 2022-09-23 23:01:39 +08:00
Him188
9122dddfb7
[core] Add net.mamoe.mirai.utils.Closeable for MPP use 2022-09-23 21:38:06 +08:00
微莹·纤绫
2db9804cf2
Mock Testing Framework (#1521)
Co-authored-by: Eritque arcus <1930893235@qq.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2022-09-10 12:49:13 +08:00
Him188
f4db93745d
[core] Move structureToString from .core.utils.debug to .core.utils
due to compiler bug.
2022-08-27 01:21:14 +08:00
Him188
965ab57aaa
[core] Move StructureToStringTransformer to mirai-core-utils, and use legacy implementation as fallback. close #2097. 2022-08-26 18:42:56 +08:00
Him188
fb3f39e328 [core] Improve NetworkHandler exception handling and optimize exception logging:
- close #2175
- close #2148
- Fix `Throwable.findCause`
- Rename `mirai.network.handle.selector.logging` to `mirai.network.handler.selector.logging`
- Hide rather long and complicated `CancellationException`s, use `mirai.network.handler.cancellation.trace` to re-enable it
2022-08-26 15:20:04 +08:00
Him188
8dcc93089c [core] Optimize ExceptionCollector, flatten suppressed exceptions and add them only to the last exception 2022-08-26 15:20:04 +08:00
Him188
5358b3e4d0
[core] slightly improve performance of toUHexString 2022-08-25 13:20:09 +08:00
Him188
eeb10cc89a
[core] Update docs for implementations 2022-07-31 15:44:48 +08:00
Him188
fd67ba9204 Configure shadow relocation and add checks for multiplatform publishing 2022-07-20 00:30:16 +08:00
AdoptOSS
7325c1f7e2 native: 优化 build script 及 actions,修复 ECDH 相关资源释放问题 (#2110)
* build: fix build on Windows

* test: fix ContentEqualsTest on native

* build: allow disabling targets with property

* fix: free ECDH-related resources properly on native
avoid memory leaking (usually on *nix) or crash (usually on Windows)

Signed-off-by: AdoptOSS <adoptoss@outlook.com>

* build(workflow): remove invalid options

* fix(styling): `mirai.target` property

* build(workflow): try to limit memory usage during mirai-console:tools:gradle-plugin:integTest

* enhance(test): use buildList

* build(workflow): retry

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-07-20 00:30:16 +08:00
Him188
f962618bee Fix compiler warnings 2022-07-20 00:30:16 +08:00
Him188
21c4a5ba04 Use kotlinx-coroutines-test 2022-07-20 00:30:16 +08:00
Him188
7dbb1a5ad7 Add RunConfigurations 2022-07-20 00:30:16 +08:00
Him188
4c6b879873 Upgrade to Ktor 2.0.2, use CIO engine for linux targets; Remove ktor-client-okhttp from mirai-core-api jvmBaseMain
Use Input.readAllText instead of Input.readText, because readText only reads one buffer.
#2084
2022-07-20 00:30:16 +08:00
Him188
daf9c4a208 Configure GitHub Actions for native 2022-07-20 00:30:16 +08:00
Him188
21d883b630 Introduce higher performance compression/decompression methods for different purposes for common 2022-07-20 00:30:16 +08:00
Him188
4f61417af6 Use Zlib for compression/decompression on native 2022-07-20 00:30:16 +08:00
Him188
13dadd5a95 Implement mirai-core for native 2022-07-20 00:30:16 +08:00
Him188
7088835402 HMPP 2022-07-20 00:30:16 +08:00
Him188
ff2a8acb0c Implement multiplatform modules 2022-07-20 00:30:16 +08:00
Him188
ce87400998 Use ktor-io to replace kotlinx-io 2022-07-20 00:30:16 +08:00
Him188
0571be1a55 Commonize projects: mirai-core series, and mirai-console-compiler-annotations 2022-07-20 00:30:16 +08:00
Him188
d96641dedb Configure HMPP project structure 2022-07-20 00:30:16 +08:00
Him188
c8fb354d13 Add LongMessageProtocolTest and various improvements:
Change attributes carrying helper objects to components

Make ClockHolder open

Use originalMessage for MessageReceipt
2022-05-25 22:39:53 +01:00
Him188
c1a7dd9843 Add some capability for delegation for TypeSafeMap 2022-05-25 22:39:53 +01:00
Him188
90deacb692 Fix imageType sent from macOS client, fix #1111 2022-05-25 22:39:53 +01:00
Him188
089b403a06 Allow nulls in TypeSafeMap 2022-05-25 22:39:53 +01:00
Him188
a89f6aeaef Integrate new MessageProtocol with existing code 2022-05-25 22:39:53 +01:00
Him188
c47779c726 MessageProtocol implementations 2022-05-25 22:39:53 +01:00
Him188
a9516b401b Generalize chineseLength to mirai-core-utils 2022-05-25 22:39:53 +01:00
Him188
3be16c4644 Code cleanup. Remove duplicated internal utilities. 2022-04-25 14:15:29 +01:00
Him188
e7dcf676fc Handle leading length for ByteArray.loadAs, fix deserialization problem with RequestPush. Fix #1991, #1899. 2022-04-25 14:06:31 +01:00
Him188
499f7beb1d Add DeprecatedSinceMirai.internalSince 2022-04-13 12:34:30 +01:00
Him188
e78074c1a1 TypeSafeMap: allow using supertypes in get with default value 2022-04-06 15:50:37 +01:00
Karlatemp
cf39a628a2
Drop emoji when rendering at; fix #1938 2022-03-27 21:49:04 +08:00
Him188
603e29d739 Add Either.flatMapNull 2022-03-16 15:27:11 +00:00
Him188
351357a8e0 Add ExceptionCollector.compressExceptions 2022-03-16 15:27:10 +00:00
Him188
7d3971259d
Review deprecation for 2.10. close #1742 (#1774) 2022-01-14 18:26:44 +00:00