Skip to content

feat(pkg): add compat.hiredis@1.2.0 + compat.redis-plus-plus (1.3.3 & 1.3.13) - #188

Merged
Sunrisepeak merged 4 commits into
mcpplibs:mainfrom
wellwei:codex/redis-plus-plus
Aug 8, 2026
Merged

feat(pkg): add compat.hiredis@1.2.0 + compat.redis-plus-plus (1.3.3 & 1.3.13)#188
Sunrisepeak merged 4 commits into
mcpplibs:mainfrom
wellwei:codex/redis-plus-plus

Conversation

@wellwei

@wellwei wellwei commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

新增两个 compat 包:Redis C/C++ 客户端

包与版本

版本 形态
compat.hiredis 1.2.0 Form A(C 源码 compat,7 TU,上游 CMake hiredis_sources 原样)
compat.redis-plus-plus 1.3.13 + 1.3.3 Form A(C++ 源码 compat)+ Shape-E 特征(hiredis_features.h 快照)

版本选型:经典、泛用优先,不追最新。hiredis 1.2.0 是 Debian 12 / Ubuntu 24.04 稳定版在用的版本(也是 vcpkg 长期默认);redis-plus-plus 1.3.13 是 2025 快速迭代前的长期稳定版。

关键设计

  • hiredis 平铺头 → hiredis/ 前缀:tarball 头文件平铺,而消费方(redis-plus-plus 源码)写 #include <hiredis/hiredis.h>;用 generated_files 薄包装头(尖括号转引真实头)对齐上游安装布局,先例:compat.openglGL/gl.h
  • 单描述符跨分水岭双版本:1.3.3(旧结构,15 TU,无 redis_uri.cpp/patterns/redlock.cpp,无 hiredis_features.h)与 1.3.13(现代 17-TU 结构)共享同一份 sources —— 1.3.3 的 TU 是 1.3.13 的严格子集,恰好两个 glob 零命中(警告非错误)。同款前提见 compat.catch2 的并集说明。
  • 基座零额外依赖:只编同步核心,async(libuv)/TLS(OpenSSL) TU 不收;唯一依赖 compat.hiredis

测试

  • 新增成员 redis-plus-plus(钉 1.3.13)与 redis-plus-plus-v133(钉 1.3.3):进程内跑迷你 RESP server(PING→+PONG、SET→+OK),离线全链路断言(跨平台 socket 抽象同 websocket 成员)。
  • 本地 CI 钉版 mcpp 2026.8.8.2 两成员均 test result ok,输出 OK: PING -> PONG, SET -> OK

验证

  • lint 全绿:mcpp xpkg parse(钉版)、check_mirror_urls.luacheck_package_name.luacheck_cross_package_refs.luacheck_platform_version_parity.lua
  • SHA 均两次独立下载一致,无归档漂移。

说明

  • CN 镜像:无 mcpp-res 写权限,url 用纯字符串上游 release(先例 compat.spdlog),可由维护者后续补 { GLOBAL, CN }
  • Windows:-DNOMINMAX/ws2_32/crypt32 按上游 CMake 与 c-ares 先例写入,本机无法实证,待 CI 三平台确认。
  • 设计文档:.agents/docs/2026-08-09-add-redis-plus-plus-plan.md

wellwei added 4 commits August 9, 2026 01:53
…-list union

One descriptor now serves both sides of the 1.3.6 source-structure watershed:
1.3.13 (17 sync TUs) and 1.3.3 (15 TUs, no redis_uri.cpp/redlock.cpp, no
hiredis_features.h). The union works because 1.3.3's TUs are a strict subset
of 1.3.13's, so exactly two source globs match nothing there (a warning, not
an error — same premise as compat.catch2's disjoint union). New member
tests/examples/redis-plus-plus-v133 pins 1.3.3; both members pass the same
offline RESP round-trip test under mcpp 2026.8.8.2.
…_t' under vendored gcc/libstdc++

1.3.3's utils.h declares uint16_t crc16(...) without including <cstdint>
(upstream added it in 1.3.6+). clang's libc++ pulls it in transitively, but
the linux-default (gcc, vendored libstdc++) CI leg does not:
'uint16_t' does not name a type. Package cxxflags -include cstdint fixes the
package build on every leg (harmless for 1.3.13, which includes it itself),
and the v133 member's [build] cxxflags covers its test TU (which includes
<sw/redis++/redis++.h> first). Caught by CI: workspace linux default 0/1.
…me initial, not the short name

The repository rule is pkgs/<x>/<name>.lua with <x> = initial of the FULL
package name (compat.* → c, docs/repository-and-schema.md). compat.redis-plus-plus
was wrongly placed in pkgs/r/ (short-name initial); the compat namespace
belongs in pkgs/c/ next to compat.hiredis. Resolution is path-independent, so
this is purely the directory convention — README links, the member comment and
the design doc updated in lock-step.
@Sunrisepeak
Sunrisepeak merged commit 698b95e into mcpplibs:main Aug 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants