From 311c96b89c7a2c77c40bda960844feb3464f01fd Mon Sep 17 00:00:00 2001 From: yizhinailong Date: Mon, 19 Oct 2026 12:13:29 +0800 Subject: [PATCH] feat: update compat.httplib 0.62.0 --- ...10-19-update-compat-httplib-0.62.0-plan.md | 72 +++++++++++++++++++ CHANGELOG.md | 13 ++++ pkgs/c/compat.httplib.lua | 12 ++++ tests/examples/httplib-brotli/mcpp.toml | 2 +- .../examples/httplib-no-exceptions/mcpp.toml | 2 +- tests/examples/httplib-tls/mcpp.toml | 2 +- tests/examples/httplib-zlib/mcpp.toml | 2 +- tests/examples/httplib-zstd/mcpp.toml | 2 +- tests/examples/httplib/mcpp.toml | 2 +- 9 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 .agents/docs/2026-10-19-update-compat-httplib-0.62.0-plan.md diff --git a/.agents/docs/2026-10-19-update-compat-httplib-0.62.0-plan.md b/.agents/docs/2026-10-19-update-compat-httplib-0.62.0-plan.md new file mode 100644 index 00000000..c60f0f0f --- /dev/null +++ b/.agents/docs/2026-10-19-update-compat-httplib-0.62.0-plan.md @@ -0,0 +1,72 @@ +# Update compat:httplib to 0.62.0 + +## Scope and source + +- Upstream: . +- Add `0.62.0` to Linux, macOS and Windows; retain the existing `0.53.1` entries. +- Keep the Form B header-only recipe unchanged: the archive still ships one + `httplib.h` at its root (the leading `*` in `include_dirs` absorbs the + `cpp-httplib-0.62.0/` wrapper), and the generated anchor TU still gives the + package a lib target for consumers to link. +- Update the six example members (`httplib`, `httplib-tls`, `httplib-zlib`, + `httplib-brotli`, `httplib-zstd`, `httplib-no-exceptions`) to `0.62.0`. + Feature names and dependency shapes are unchanged. + +## Archives and mirrors + +The GitHub tag archive was downloaded twice and each copy hashed; both +downloads produced the same SHA-256: + +| Version | SHA-256 | +| --- | --- | +| 0.62.0 | `7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8` | + +No GitCode configuration or token is available in this environment. The new +entries use plain upstream URLs, as allowed by `docs/cn-mirror.md`; the +existing 0.53.1 entries are untouched. + +## Recipe and compatibility + +- The upstream CMake `option(...)` set is byte-for-byte the same in 0.53.1 and + 0.62.0 (diffed the two files). There is no new build switch to encode in + the descriptor. +- Upstream `target_link_libraries` is also unchanged: Threads on all + platforms, `ws2_32`/`crypt32` on Windows, and + CFNetwork/CoreFoundation/Security on Darwin. The descriptor already carries + those in `linux`/`macosx`/`windows` `ldflags`. +- The header grew from 747,115 to 846,648 bytes. The additions (SSE client, + WebSocket helpers, hardening) live entirely inside `httplib.h`: they add no + defines, no extra sources and no link requirements, so the recipe needs no + new feature entry. +- 0.62.0's own release note is a runtime fix: on Windows a pong timeout now + also wakes a blocked `read()`, and `read()` returns `Fail` rather than + `Timeout` for a connection that has closed. No descriptor impact. +- 0.62.0 upstream also understands wolfSSL and MbedTLS + (`CPPHTTPLIB_WOLFSSL_SUPPORT` / `CPPHTTPLIB_MBEDTLS_SUPPORT`). This index + has no `compat.wolfssl` or `compat.mbedtls`, so no feature is added; `tls` + remains OpenSSL-only, exactly as before. +- Feature set unchanged: `tls`, `zlib`, `brotli`, `zstd`, `no-exceptions`. + +## Validation + +- `mcpp xpkg parse pkgs/c/compat.httplib.lua` -> `parse OK`, listing `0.62.0` + and `0.53.1` on all three platforms. +- Windows, local mcpp 2026.10.11.1 (CI pins 2026.10.1.2 in + `.github/workflows/validate.yml`), LLVM 23.1.3 / MSVC 14.44.35207: + - `mcpp test -p httplib` -> 1 passed; 0 failed. + - `mcpp test -p httplib-zlib` -> 1 passed; 0 failed. + - `mcpp test -p httplib-brotli` -> 1 passed; 0 failed. + - `mcpp test -p httplib-no-exceptions` -> 1 passed; 0 failed. + - `mcpp test -p httplib-tls` -> blocked before compiling `compat.httplib`: + the `compat.openssl` 3.5.1 install hook on Windows needs a Perl with + `Locale::Maketext::Simple` (upstream's Configure), and this host has no + Perl at all. Environmental, not caused by this update; the mirror was + forced to GLOBAL because `mirror = "auto"` otherwise hangs trying the CN + source. CI decides this leg. + - `mcpp test -p httplib-zstd` -> blocked before compiling `compat.httplib`: + `compat.zstd` 1.5.7 unpacking fails on Windows because the upstream tag + archive contains the symlink `tests/cli-tests/bin/unzstd -> zstd`, which + xlings cannot materialise. The package and this member's dependency shape + are unchanged by this update, so the failure is pre-existing and + environmental; CI decides this leg. +- The Linux and macOS legs are left to CI. diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a09290b..07000848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ ### Added +- **`compat.httplib` 0.62.0。** 在 `0.53.1` 之外新增版本键(旧键保留)。仍是纯头文件 Form B: + 归档根目录仍只有一份 `httplib.h`(747,115 → 846,648 字节,增量是 SSE 客户端、WebSocket + 辅助与加固,全部落在头内,不引入 define、源文件或链接依赖),描述符的内联构建无需改动。 + 上游 CMake 的 `option()` 集合与 `target_link_libraries` 在 0.53.1→0.62.0 之间逐项相同 + (两版实测 diff),三平台 ldflags 照旧。0.62.0 上游认识 wolfSSL/MbedTLS 后端,但本索引 + 没有对应的 compat 包,`tls` 仍只接 OpenSSL,不新增 feature。实测(Windows / mcpp + 2026.10.11.1 / LLVM 23.1.3 + MSVC 14.44):`mcpp xpkg parse` OK;`httplib`、`httplib-zlib`、 + `httplib-brotli`、`httplib-no-exceptions` 各 1 passed。`httplib-tls` 与 `httplib-zstd` + 在本机都止步于依赖安装、未编到本包:`compat.openssl` 3.5.1 的 Windows 安装钩子需要带 + `Locale::Maketext::Simple` 的 Perl,而本机没有 Perl;`compat.zstd` 1.5.7 的上游 tag 归档含 + 符号链接 `tests/cli-tests/bin/unzstd -> zstd`,Windows 上 xlings 无法创建。两项都与本次 + 改版无关,交 CI 裁决。六个测试成员同步改到 0.62.0。 + - **`compat.soci` 4.1.4。** SOCI(C++ 数据库访问层)以 C++ 源码 compat 形态收录:上游 `src/core` 的 22 个 TU 与 sqlite3 后端的 10 个 TU 编入**同一个 lib** —— 上游 CMake 把它们拆成 `soci_core`/`soci_sqlite3` 两个库,但 mcpp 的 `sources` 是每包一张表,且没有后端的 core 连 diff --git a/pkgs/c/compat.httplib.lua b/pkgs/c/compat.httplib.lua index f11223ad..3273a1d9 100644 --- a/pkgs/c/compat.httplib.lua +++ b/pkgs/c/compat.httplib.lua @@ -13,18 +13,30 @@ package = { -- No mcpp-res credentials are available in this environment. Keep the -- GLOBAL URL as a plain string until a byte-identical CN asset exists. linux = { + ["0.62.0"] = { + url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.62.0.tar.gz", + sha256 = "7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8", + }, ["0.53.1"] = { url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz", sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2", }, }, macosx = { + ["0.62.0"] = { + url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.62.0.tar.gz", + sha256 = "7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8", + }, ["0.53.1"] = { url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz", sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2", }, }, windows = { + ["0.62.0"] = { + url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.62.0.tar.gz", + sha256 = "7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8", + }, ["0.53.1"] = { url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz", sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2", diff --git a/tests/examples/httplib-brotli/mcpp.toml b/tests/examples/httplib-brotli/mcpp.toml index ad9d9a45..97a37b5b 100644 --- a/tests/examples/httplib-brotli/mcpp.toml +++ b/tests/examples/httplib-brotli/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-brotli-tests" version = "0.1.0" [dependencies.compat] -httplib = { version = "0.53.1", features = ["brotli"] } +httplib = { version = "0.62.0", features = ["brotli"] } diff --git a/tests/examples/httplib-no-exceptions/mcpp.toml b/tests/examples/httplib-no-exceptions/mcpp.toml index 01ea5607..9f26b6eb 100644 --- a/tests/examples/httplib-no-exceptions/mcpp.toml +++ b/tests/examples/httplib-no-exceptions/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-no-exceptions-tests" version = "0.1.0" [dependencies.compat] -httplib = { version = "0.53.1", features = ["no-exceptions"] } +httplib = { version = "0.62.0", features = ["no-exceptions"] } diff --git a/tests/examples/httplib-tls/mcpp.toml b/tests/examples/httplib-tls/mcpp.toml index b04ce82e..936d0e3f 100644 --- a/tests/examples/httplib-tls/mcpp.toml +++ b/tests/examples/httplib-tls/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-tls-tests" version = "0.1.0" [dependencies.compat] -httplib = { version = "0.53.1", features = ["tls"] } +httplib = { version = "0.62.0", features = ["tls"] } diff --git a/tests/examples/httplib-zlib/mcpp.toml b/tests/examples/httplib-zlib/mcpp.toml index e557f6b6..530a9e12 100644 --- a/tests/examples/httplib-zlib/mcpp.toml +++ b/tests/examples/httplib-zlib/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-zlib-tests" version = "0.1.0" [dependencies.compat] -httplib = { version = "0.53.1", features = ["zlib"] } +httplib = { version = "0.62.0", features = ["zlib"] } diff --git a/tests/examples/httplib-zstd/mcpp.toml b/tests/examples/httplib-zstd/mcpp.toml index cf588ca1..fd6b6f9d 100644 --- a/tests/examples/httplib-zstd/mcpp.toml +++ b/tests/examples/httplib-zstd/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-zstd-tests" version = "0.1.0" [dependencies.compat] -httplib = { version = "0.53.1", features = ["zstd"] } +httplib = { version = "0.62.0", features = ["zstd"] } diff --git a/tests/examples/httplib/mcpp.toml b/tests/examples/httplib/mcpp.toml index 0a16701f..d52151ac 100644 --- a/tests/examples/httplib/mcpp.toml +++ b/tests/examples/httplib/mcpp.toml @@ -3,4 +3,4 @@ name = "httplib-tests" version = "0.1.0" [dependencies.compat] -httplib = "0.53.1" +httplib = "0.62.0"