Docs: add v5.0.1 release notes and changelog

- docs/update: add v5.0.1 release notes (bilingual) for the libloader crash fix, the typed event bus and the new CI

- docs/update: add the 5.0.1 entry to the changelog
This commit is contained in:
xiaozhou233 committed 2026-10-16 13:08:25 +08:00
1 parent 19b1bfb88a
commit 9351556cda
2 files changed
+125

No files matched your search

+48
View File
@@ -6,6 +6,30 @@ This file records notable changes to JuiceAgent. For older releases, see [GitHub
## 中文 ## 中文
### [5.0.1] - 2026-10-16
#### 🐛 修复
- 修复配置错误导致目标 JVM 崩溃:`libloader.dll` 是反射加载的,其展开表未被登记,C++ 异常在其中既无法 unwind 也无法捕获。现改为配置读取非抛出 + 解析走无异常模式,并以 `-fno-exceptions` 编译 libloader,任何会抛异常的代码在编译期即失败。
#### ✨ 新功能
- 事件总线新增 `subscribeFront` / `listenFront`(监听者顺序能力)。
#### 🔧 内部改动
- 用约 60 行类型安全事件总线替换 `eventpp`(移除 23 个 in-tree 头文件,约 144 KB)。
- 移除无引用的 `MethodEntry` / `MethodExit` 事件定义。
#### 📝 文档
- 新增 `docs/config.md` 与 `docs/update/`;重写 `docs/advanced.md`;README 配置示例升级到 v2。
#### 🔁 CI
- 新增 GitHub Actions 工作流(构建 + 集成测试 + 打包 + 上传 artifact)与 `tests/run-tests.ps1`。
- 构建改为静态链接 C/C++ 运行时。
### [5.0.0] - 2026-10-15 ### [5.0.0] - 2026-10-15
#### ⚠️ 破坏性变更 #### ⚠️ 破坏性变更
@@ -51,6 +75,30 @@ This file records notable changes to JuiceAgent. For older releases, see [GitHub
## English ## English
### [5.0.1] - 2026-10-16
#### 🐛 Fixes
- Fix a config error crashing the target JVM: `libloader.dll` is reflectively loaded, so its unwind tables are never registered and a C++ exception cannot be unwound or caught there. Config reads are now non-throwing, parsing runs in non-throwing mode, and libloader is compiled with `-fno-exceptions` so exception-capable code fails the build.
#### ✨ Features
- New `subscribeFront` / `listenFront` listener-ordering support on the event bus.
#### 🔧 Internal
- Replace `eventpp` with a ~60-line type-safe event bus (removes 23 in-tree headers, ~144 KB).
- Remove the unreferenced `MethodEntry` / `MethodExit` event definitions.
#### 📝 Docs
- Add `docs/config.md` and `docs/update/`; rewrite `docs/advanced.md`; update the README config examples to v2.
#### 🔁 CI
- Add a GitHub Actions workflow (build + integration tests + package + artifact upload) and `tests/run-tests.ps1`.
- Link the C/C++ runtime statically.
### [5.0.0] - 2026-10-15 ### [5.0.0] - 2026-10-15
#### ⚠️ Breaking Changes #### ⚠️ Breaking Changes
+77
View File
@@ -0,0 +1,77 @@
# JuiceAgent 5.0.1 Release Notes
## 中文
### 🐛 修复
- **修复配置错误导致目标 JVM 崩溃**:当 `config.toml` 缺少必填项(例如 `JarLoader.Mode`)或语法不合法时,被注入的目标 JVM 会以 `EXCEPTION_ILLEGAL_INSTRUCTION` 崩溃。
根因是 `libloader.dll` 采用**反射加载(手动映射)**,其展开表(unwind tables)不会被系统登记,因此在其中抛出的 C++ 异常**既无法 unwind 也无法被 catch**——`try/catch` 在这里是无效的。修复方式:
- 配置读取全部改为**非抛出**:缺 key / 类型不符只记日志并**提前返回**,报错精确到具体 key;
- 配置解析在**无异常模式**下进行(`toml::parse_result`),畸形 TOML 也只报错、不崩;
- `libloader` 目标以 **`-fno-exceptions`** 编译,以后任何会抛异常的代码都会在**编译期**失败。
### ✨ 新功能
- 事件总线新增 `subscribeFront` / `listenFront`:可将监听者插入队首优先执行(为后续 transformer 管线预留的顺序能力)。
### 🔧 内部改动
- 用约 60 行的**类型安全**事件总线替换第三方库 `eventpp`:监听者按事件类型注册与调用,不再有 `const void*` 强转;同时移除 in-tree 的 eventpp 头文件(23 个文件,约 144 KB)及其 license。
- 移除无引用的 `MethodEntry` / `MethodExit` 事件定义。
### 📝 文档
- 新增 [docs/config.md](../config.md)(v2 配置完整参考)与 [docs/update/](../update/)(发布说明 + CHANGELOG)。
- 重写 [docs/advanced.md](../advanced.md);README(中/英)配置示例升级到 v2。
### 🔁 CI
- 新增 GitHub Actions 工作流 `.github/workflows/ci.yml`:在 `windows-latest` 上用 MinGW-w64 + Ninja 构建、运行集成测试、打包,并把 `JuiceAgent_v*.zip` 作为 artifact 上传(保留 14 天)。
- 新增可复用的测试脚本 `tests/run-tests.ps1`:编译 → 刷新 `tests/resources` → 逐条运行并按**输出断言**(测试程序即使失败也返回 0,所以只看退出码不够)。
- 构建改为**静态链接** C/C++ 运行时(与本地 w64devkit 一致),避免运行时 DLL 版本不匹配导致 `UnsatisfiedLinkError`。
---
## English
### 🐛 Fixes
- **Fix a config error crashing the target JVM**: when `config.toml` was missing a required key (e.g. `JarLoader.Mode`) or was malformed, the injected target JVM crashed with `EXCEPTION_ILLEGAL_INSTRUCTION`.
The root cause is that `libloader.dll` is **reflectively loaded (manually mapped)**, so its unwind tables are never registered with the OS and a C++ exception thrown inside it can be neither unwound nor caught - `try/catch` simply cannot work there. The fix:
- configuration reads are now **non-throwing**: a missing key or type mismatch is logged and the loader **returns early**, with the error naming the exact key;
- config parsing happens in **non-throwing mode** (`toml::parse_result`), so malformed TOML is reported instead of crashing;
- the `libloader` target is compiled with **`-fno-exceptions`**, so any exception-capable code added later fails the **build** instead of crashing at runtime.
### ✨ Features
- New `subscribeFront` / `listenFront` on the event bus, to register a listener ahead of the existing ones (ordering support for a future transformer pipeline).
### 🔧 Internal
- Replace the `eventpp` dependency with a ~60-line, **type-safe** event bus: listeners are registered and invoked by concrete event type, with no `const void*` casting; the in-tree eventpp headers (23 files, ~144 KB) and their license are removed.
- Remove the unreferenced `MethodEntry` / `MethodExit` event definitions.
### 📝 Docs
- Add [docs/config.md](../config.md) (full v2 configuration reference) and [docs/update/](../update/) (release notes + changelog).
- Rewrite [docs/advanced.md](../advanced.md); update the config examples in both READMEs to v2.
### 🔁 CI
- Add a GitHub Actions workflow (`.github/workflows/ci.yml`) that builds with MinGW-w64 + Ninja on `windows-latest`, runs the integration tests, packages the release, and uploads `JuiceAgent_v*.zip` as a build artifact (14-day retention).
- Add a reusable test runner, `tests/run-tests.ps1`, which compiles the modules, refreshes `tests/resources`, then runs every test and asserts on its **output** (the test programs exit 0 even on failure, so exit codes are not enough).
- Link the C/C++ runtime **statically** (matching the local w64devkit build) so the DLLs do not fail to load because of a mismatched runtime DLL on the machine.
---
如果您在使用过程中遇到问题,可以加入我们的QQ/Discord群组
If you encounter any issues during use, you can join our QQ/Discord group
Discord: [JuiceDev](https://discord.gg/AQTnUyWNNJ)
QQ群: 1103504356
**Full Changelog**: https://github.com/xiaozhou233/JuiceAgent/compare/v5.0.0...v5.0.1