[1127] TMU 序列化迁移到 moebius#3844
Merged
Merged
Conversation
记录 What/Why/How 与涉及文件清单,作为本 PR 第一个 commit。
将 from_tmu.cpp + to_tmu.cpp 合并为 moebius/Data/Convert/tmu.cpp, 声明收入 tmu.hpp。get_codes 连同其 helper 内联为 static,is_snippet 收口到 moebius tree_helper,主工程 convert.hpp 改为转发。删除 src/Data/Convert/Mogan/ 下的两个旧文件,顺手清理 from_tmu 顶部 无用的 preferences.hpp include。
把 tmu.cpp 里 XMACS_VERSION/TEXMACS_VERSION 的 #ifndef 占位值从 "0.0.0" 改为主工程当前真实版本,主工程升级时需同步。同步更新 devel/1127.md 的说明。
按 lolly 的合并模式,把 moebius 的构建/测试并入 ci-debian13 / ci-fedora / ci-macos-arm64 / ci-xmake-windows:paths 加入 moebius 路径,paths-filter 增加 moebius/moebius_src 过滤器,cache key 的 hashFiles 追加 moebius/xmake.lua,新增 build/test moebius 步骤, 主构建步骤的触发条件纳入 moebius_src。ci-fedora 此前连 lolly 都 未合并,一并补齐 lolly+moebius。删除独立的 ci-moebius-*.yml。
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.
Summary
将 TMU 序列化/反序列化从
src/Data/Convert/Mogan/下沉到moebius/Data/Convert/,延续 [1124]/[1126] 的「主工程 → moebius/lolly」剥离方向。moebius/Data/Convert/tmu.{hpp,cpp}:合并自from_tmu.cpp+to_tmu.cpp,导出tmu_to_tree/tmu_to_tree(version)/tmu_document_to_tree/tree_to_tmu。get_codes连同其 helper(rename_feature/new_feature)内联为static,随 tmu 一并下沉。is_snippet收口到 moebiusData/Tree/tree_helper,主工程convert.hpp改为转发,generic.cpp删本地实现。convert.hpp的 TMU 三函数声明改为#include "tmu.hpp",glue_convert.lua无需改动。src/Data/Convert/Mogan/from_tmu.cpp+to_tmu.cpp(连同空目录),顺手清理from_tmu顶部无用的#include "preferences.hpp"。边界处理
XMACS_VERSION/TEXMACS_VERSION由主工程tm_configure.hpp注入,moebius 编译单元看不到。在tmu.cpp顶部用#ifndef给占位定义。占位值不影响运行时:单参tmu_reader构造直接用STD_CODE(不调get_codes),双参构造的 version 来自文件头解析的真实版本号。后续可单独 PR 把版本号参数化。Test plan
xmake b libmoebiusxmake b stem(含 glue_convert 生成与链接)xmake b convert_test && xmake r convert_test—— 4 passedgf fmt --changed-since=main—— 0 改动🤖 Generated with Claude Code