chore: 身份对齐上游 —— ocornut:imgui@1.92.8,app facade 收进 feature - #12
Merged
Conversation
This was referenced Aug 6, 2026
Member
Author
更正:PR 描述里「为什么两件事必须同批」那一节的论据是错的我在描述里写:
那个成员写的是限定名,带着段头看是 真正成立的后果是另一条:module 层的成员用的才是裸名( 判据与本 PR 的改动都不依赖那条错误论据:命名空间说的是这个库是谁的,版本说的是你拿到的是哪一版上游。同批做仍然对,理由退化成朴素的一条 —— 一次迁移比两次迁移少让用户改一遍写法。 |
两处都不是外观问题。
**版本 0.0.6 是打包计数**,消费者看不出自己拿到的是哪一版 Dear ImGui。实际包的是
1.92.8-docking。对照组就在同一个索引里:`compat.imgui@1.92.8`、`compat.ffmpeg@8.1.2`、
`compat.lua@5.4.7` 一直是对的。
**命名空间 mcpplibs 不是"上游是谁"的答案** —— 它是 mcpp 的默认命名空间
(`kDefaultNamespace = "mcpplibs"`),裸名就落在那里。Dear ImGui 是 ocornut 的,本仓库
只是在它之上加了 C++23 module 层。索引里 `nlohmann.json`、`fmtlib.fmt`、
`godotengine.godot-cpp-m` 早就是这个口径。规则与全量迁移表见 mcpp-index#163。
两件事必须同批做:只改版本会让 `imgui = "1.92.8"` 这类裸名在第一级就命中本包,而它
们今天落到的是 `compat.imgui`(源码构建)—— 静默换成另一个包。迁出 mcpplibs 之后
第一级永远落空,现有写法行为不变。
**app 收进 feature**:`imgui.app` 是本仓库发明的 facade,不属于上游 Dear ImGui;而
backends 属于(上游自己就发 backends/imgui_impl_glfw.cpp),所以只 gate 前者。想要
原生 ImGui API 的人不该被塞一个框架。
已验证 gating 是真的而不是装饰 —— 去掉 feature 后:
warning: module 'imgui.app' imported but not provided in this build
error: build failed
带上 feature 则正常构建。默认档 `mcpp test` 3 个用例全过。
模板与 examples 相应声明 feature。模板里 `ocornut` 是硬编码的:mcpp 的模板变量只有
{{self.name}} 与 {{self.version}},没有 {{self.namespace}},非默认命名空间的包因此
拼不出自己的依赖声明 —— 这个缺口另行补。
CI 此前就已经红,与本次身份迁移无关:pin 的 mcpp 低于索引声明的 min_mcpp,
每次都停在同一个地方 ——
error: index requires mcpp >= 2026.8.3.3 but this is mcpp <old> [E0006]
索引下限是一道机器闸门(mcpp#349):索引是数据、mcpp 是程序,发布数据不得让程序
失效,所以下限只在描述符真的读不动时才抬。这里要动的是客户端这一侧。
opencv-m 的 CI 有个守卫,把 templates/ 下所有 {{…}} 与白名单比对。注释里写字面
占位符会被判成未知占位符 —— 改成散文描述,免得同一个守卫在这里也炸。
Sunrisepeak
force-pushed
the
chore/upstream-identity
branch
from
August 6, 2026 01:52
c929a2e to
8af174a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
生态规范化的第一例,规则与全量迁移表见 mcpp-index#163。
版本:0.0.6 → 1.92.8
0.0.6是打包计数,消费者看不出拿到的是哪一版 Dear ImGui(实际是 1.92.8-docking)。同一个索引里compat.imgui@1.92.8、compat.ffmpeg@8.1.2、compat.lua@5.4.7一直是对的。命名空间:mcpplibs → ocornut
mcpplibs不是"上游是谁"的答案 —— 它是 mcpp 的默认命名空间:Dear ImGui 是 ocornut 的,本仓库只是在它之上加 C++23 module 层。索引里
nlohmann.json/fmtlib.fmt/godotengine.godot-cpp-m早就是这个口径。为什么两件事必须同批
裸名梯级是
(mcpplibs, X) → (compat, X)。索引现状:只改版本会让前者在第一级就命中本包,静默换成另一个包。迁出 mcpplibs 后第一级永远落空,现有写法行为不变。
app facade 收进 feature
imgui.app是本仓库发明的 facade;backends 属于上游(上游自己就发backends/imgui_impl_glfw.cpp)。所以只 gate 前者 —— 想要原生 ImGui API 的人不该被塞一个框架。已验证 gating 是真的,去掉 feature 后:
带上 feature 正常构建;默认档
mcpp test3 个用例全过(105s)。附带发现
模板里
ocornut是硬编码的 —— mcpp 的模板变量只有{{self.name}}与{{self.version}},没有{{self.namespace}},于是非默认命名空间的包无法在自己的模板里拼出依赖声明。这会打到每一个带模板的待迁包,另行补。索引侧的描述符(
pkgs/o/ocornut.imgui.lua+ 旧条目冻结)需要本 PR 合入后的 tag,另开 PR。