Commit Graph

125 Commits

Author SHA1 Message Date
Him188
f527aa9b40 Update docs for commands 2022-06-17 15:00:20 +01:00
Him188
90bc48177a Allow overriding CommandArgumentContext in JCompositeCommand and JSimpleCommand 2022-06-17 15:00:20 +01:00
Him188
eeb361358a Add CommandContext and support retrieving original message chain from command, close #1835 2022-06-17 15:00:20 +01:00
Him188
371673678e
Update hints for builtin ValueArgumentParsers 2022-06-15 11:10:12 +01:00
Him188
a4e7fda416
Raise deprecation level for 2.12 2022-06-14 11:19:44 +01:00
Him188
98e05f3bf4
Improve comments in LoggerConfig 2022-06-14 10:24:38 +01:00
Him188
70c8255b6b
相反于加载顺序卸载插件, close #1994 2022-06-13 19:48:09 +01:00
Eritque arcus
4408750847
mark plugin disabled when it throw exception during enable process (#2022)
* Fix bootstrap when no env specified

* add PluginWithExceptionTest

* Add exceptedExceptionMessage in MCIT(Throwable or Exception may not work?)

* Using red color show disabled plugins in /status command

* Catch exception during enable process

* Count plugins without disabled plugins

* Revert "Fix bootstrap when no env specified"

This reverts commit ff9bb180fd6687c5da27b8a38da2658a1b26ad93.

* format

* format

* halt plugin enable process when mirai failed to enable it dependencies.

* Update mirai-console/backend/mirai-console/src/internal/plugin/PluginManagerImpl.kt hint

Co-authored-by: Him188 <Him188@mamoe.net>

* rename tmp to dependsOn

* Revert changes of PluginManagerImpl

* Plugin callback executions assertions

* Improve & Fix Logic

* Fix PluginDependOnErrorPlugin

* Update err msg

* move dependencies check from JvmPluginInternal.kt to BuiltInJvmPluginLoaderImpl.kt

* typo

* don't throw err caused by dependencies fail

Co-authored-by: Him188 <Him188@mamoe.net>
Co-authored-by: Karlatemp <kar@kasukusakura.com>
2022-06-13 19:45:39 +01:00
cssxsh
2d41a617fe
在 MultiFilePluginDataStorage.load 失败时,备份数据文件 (#2089)
* feat: load data failure, backup data file

* feat: load data failure, backup data file

* feat: currentTimeMillis
2022-06-13 19:45:22 +01:00
TheFatCat
342538e31b
修复在插件配置的saveName中使用子路径出现的异常 (#2088) 2022-06-13 19:45:11 +01:00
微莹·纤绫
d0c1848c94
Improve console shutdown (#2016)
* Try to improve console shutdown

* Resetting & Better java calling

* Dump crash report when timed out to shutdown

* Ensure `CoroutineScope.cancel()` working; rename to `shutdown`

* Signal handlers

* Force halt system to avoid some magic errors
2022-06-07 00:10:51 +08:00
微莹·纤绫
0b67a6783a
PluginCustomCommandSender (#1964)
* PluginCustomCommandSender

* Update doc & remove lazy

* Update CommandSender.kt
2022-06-07 00:10:28 +08:00
水纹霖霖
d9c1da275b
fix protocol guideline & update docs (#2067)
* Update Bots.md

* Update AutoLoginConfig.kt
2022-06-06 16:57:27 +01:00
Him188
b40b681f81 Deprecate EmptyMessageChain in favor of emptyMessageChain() 2022-05-25 22:39:53 +01:00
Him188
a9516b401b Generalize chineseLength to mirai-core-utils 2022-05-25 22:39:53 +01:00
Karlatemp
167a29e0d8
Fix build 2022-05-24 18:10:18 +08:00
Karlatemp
48c2b04a49
Fix plugin's dependencies classes linking; fix #2054 2022-05-24 17:56:29 +08:00
Karlatemp
e25e604c79
Copy modules as maven module 2022-05-24 17:30:58 +08:00
Karlatemp
50e7462b6b
Rename Access to Classpath 2022-05-24 17:00:30 +08:00
Karlatemp
72d248f1e6
Fix DynLibClassLoader class resolving logic 2022-05-23 18:26:33 +08:00
Karlatemp
237320317e
JvmPluginClassLoaderAccess 2022-05-23 18:26:33 +08:00
Karlatemp
b0711ed9ab
Setup vm-names of JvmPluginClassLoader's libraries classloaders 2022-05-23 17:41:51 +08:00
Him188
26c3bca473
Do not require plugin to be loaded for getPluginDescription 2022-05-21 15:25:28 +01:00
Karlatemp
6d0e5adf95
Fix ktor 2.0.0 linking (#2051); Improve console plugin classloader logic
- Drop `io.ktor` in consoleRuntimeClasspath included by `core-api: api(io.ktor)`; Fix #2051
- Fix IT.plugin-resolve-self-dependencies-over-console-ones
- Fix IT.plugin-use-console-deps-fallback
- Fix plugin dependencies linked to AppClassLoader if any external dependencies used
2022-05-21 21:24:09 +08:00
Him188
0da75d31b9 Fix readStringListFromEnv when no env specified 2022-05-08 09:48:10 +01:00
Karlatemp
8250c3da65
Using PlatformClassLoader to resolve java.*; fix #2009 2022-05-04 16:36:13 +08:00
cssxsh
edf7622b0b
fix: ContactOrBot.render (#2010) 2022-05-04 16:28:14 +08:00
Him188
6b5f9e2eef Change file suffix of new plugins to '.mirai2.jar'. Ignore '.mirai.jar' if its '.mirai2.jar' counterparts loaded. Close #1999 2022-05-01 17:59:05 +01:00
Him188
4993e59fd0 JavaPluginSchedulerImpl: run jobs with runInterruptible 2022-04-27 12:53:33 +01:00
Him188
bb8cd86daa Update dependencies:
Kotlin 1.6.21
Dokka 1.6.20
coroutines 1.6.1
atomifFU 0.17.2
serialization 1.3.2
ktor 1.6.7
blocking-bridge 2.0.0-162.1
dynamic-delegation 0.3.0-162.2
2022-04-26 11:12:35 +01:00
Him188
e2477645cd Migrate references of JAutoSavePluginConfig in docs 2022-04-25 14:18:14 +01:00
Him188
3be16c4644 Code cleanup. Remove duplicated internal utilities. 2022-04-25 14:15:29 +01:00
Him188
2780fc4761 Fix build 2022-04-24 16:47:42 +01:00
Him188
854b55f216 Add plugin tests PluginResolveSelfDependenciesOverConsoleOnes, close #1981 2022-04-24 16:18:22 +01:00
Him188
556c805448 console IT: Do not delete entire test sandbox, keep libraries 2022-04-24 16:15:17 +01:00
Him188
97ce422b33 Update docs for console IT 2022-04-24 15:45:58 +01:00
Him188
ffbe540800 Fix AbstractPluginData.findBackingFieldValueNode 2022-04-24 15:05:53 +01:00
Him188
45defb32a2 Fix support for Any and support primitive and reference arrays, close #1801 2022-04-24 15:05:44 +01:00
Him188
d4095fa5c6
Add JavaAutoSavePluginData and deprecate JAutoSavePluginData to fix saving issues. (#1988) 2022-04-24 10:37:42 +01:00
Him188
be832c7dbd
Support serializersModule for PluginData, close #1796. Improve PluginData.value type inference behavior: resolve exact returned type. (#1987)
Also support `MessageChain` and others from `MessageSerializers.serializersModule`, fix #1922.
2022-04-24 10:37:10 +01:00
Karlatemp
35c08e8b16
Link mirai-core in console IT, fix non-hard-linked dependencies resolving 2022-04-23 17:15:20 +08:00
Him188
fbadf4a256 Fix documentation on PluginDependency.dependsOn and improve other relevant info. Fix #1869 2022-04-22 13:17:29 +01:00
微莹·纤绫
15133c7902
Rewrite PluginManagerImpl.sortByDependencies, fixing #1949: resolving optional dependencies (#1968)
* Rewrite `PluginManagerImpl.sortByDependencies`

* Update error msgs
2022-04-19 00:24:17 +01:00
cssxsh
a727704061
Fix error message for '/perm cancel' (#1918)
* fix: cancel error info

* fix: use UnsupportedOperationException

* fix: test

* fix: equals
2022-04-19 00:06:38 +01:00
Him188
4acd74974a Migrate deprecated usages and cleanup code 2022-04-13 13:08:14 +01:00
Karlatemp
706e283218
Init dependencies of no-other-plugin-depended plugins first; fix #1965 2022-04-06 20:30:05 +08:00
Karlatemp
304220708a
Fix empty resource link resolving 2022-03-30 11:52:36 +08:00
Karlatemp
51c8684e22
Resources resolving 2022-03-30 08:48:42 +08:00
Karlatemp
d6f4e2e567
Resources & ServiceLoader resolving 2022-03-30 08:48:41 +08:00
Karlatemp
94828544cb
Add DynLibClassLoader.name 2022-03-30 08:48:41 +08:00