arnold.cui-agent
changed title from feat: convert go structs to rust drafts by layout tier to feat: convert go types and structs to rust drafts2026-11-08 15:34:44 +00:00
arnold.cui-agent
requested review from arnold.cui 2026-11-08 15:35:44 +00:00
Convert all inventory structs to their target rust forms: columnar
tables for the soa tier, row structs otherwise, enums for pointer-only
sum types with *struct{}. Undecided zero-size payloads (struct{},
sync.Mutex/RWMutex locks) and unknown types emit !todo_unit / !todo
sentinels that fail compilation on purpose, so every remaining gap is
a loud build error instead of a silently compiling unit; grep counts
the debt.
The tools/ tree (customlint and friends) translates into tsox_tools
mirroring the go layout, and the lsproto structcodec skip list is
gone, so every inventory struct converts. Qualified-name resolution
disambiguates same-named packages (the customlint tspath testdata
shadow) by longest common directory prefix with the caller. The
tsox_compat package grows to 22 modules: json v2 family, xml, zip,
x/text family, xxh3, errgroup, testing, go/ast, go/token, go/types,
reflect and the x/tools go/analysis family (analysis, inspector,
ctrlflow, packages), wired through std_type so tools structs map
analysis.Pass, ast.Node, types.Type and friends.
Upstream sync through 2026-11-18 (e086ad3b): 50 new structs and 3 new
named types across ast (CaseClause/DefaultClause split from
CaseOrDefaultClause), checker (ResolvingObjectType, clearableMap),
project (ContentMapperSelector), incremental build info, vfsmatch and
tsoptions. Converted surface grows 2317 -> 2361 structs, excluded
grows 61 -> 67 (new test fixtures), audit stays fully green with zero
missing entries and zero pending fields; cargo build remains at zero
errors and zero warnings.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
背景
Go struct 与命名类型到 Rust 侧的目标形态需全部由脚本转化产出(目标:类型与结构 100% 机器生成,手写/生成以文件名划界);csv-records/ 被 gitignore,新 worktree 需能自举重建记录表。
变更内容
Option<Box<dyn X>>;匿名 struct 字段提升伴生命名 struct(19 个,同形体去重);分组参数 a, b string 展开。Result<T, String>/Option<String>;判别族(fswatch/ipc/ls-autoimport)走 ErrorValue 枚举(变体来自 go-error-inventory.csv:37 哨兵 + 控制流哨兵 + Errno(i32),Message 兜底);keep 机制退役。自测结果
6837345):移除本 PR 脚本中的全部注释(10 文件 112 行纯删除),与既有脚本零注释惯例一致;3 个入口脚本 rustc 编译通过,query 模式输出与移除前一致。• 脚本迁出(本分支末尾提交 8335c4e):scripts/ 全目录(含本 PR 新增的转化管线与 testdata)移至私有仓库 tsox-scripts,运行路径改为 ../tsox-scripts(见 agents-docs/contributing/scripts.md);csv-records.md 收敛为列语义摘要,完整口径迁至 tsox-scripts 的 docs/inventory-columns.md;docs/porting/alias-todos.md 生成来源指向同步改写。self-test:cargo check 通过、全仓 scripts/ 旧路径零残留、清单/函数/bench 三脚本冒烟正常。
feat: convert go structs to rust drafts by layout tierto feat: convert go types and structs to rust drafts0b4373dfb8to0768a007e58335c4eab2to18f81a177b18f81a177bto1974264dd71974264dd7to938d30f08e938d30f08eto55fbee42ce55fbee42ceto144af64293144af64293to0eeeb315070eeeb31507to00aba2756f00aba2756ftod1d5e64a82d1d5e64a82to0317c750480317c75048toaae2018acdaae2018acdto1aaf8438321aaf843832tocb29b98418cb29b98418to4ff30463304ff3046330to778bf405c4778bf405c4to3ae31aaa8f3ae31aaa8fto5990c5c8ee5990c5c8eetof7b6b975f5f7b6b975f5to10d6912a3110d6912a31to9e8d21fc459e8d21fc45tofa3080cc68fa3080cc68tod3ee639f47d3ee639f47to8dd1c59a9a8dd1c59a9atocf56e388dbcf56e388dbto076a68a05e076a68a05etoc390fdf699c390fdf699to04216dddf504216dddf5toef3844940aef3844940ato6eee06ab066eee06ab06toc62cce408ec62cce408eto54c1d8746254c1d87462tobb0ed79dfebb0ed79dfetodbf879d8cbdbf879d8cbtoabd4be52cfabd4be52cfto7c317816d77c317816d7to7bc5bfdbe37bc5bfdbe3to210ce74958Convert all inventory structs to their target rust forms: columnar tables for the soa tier, row structs otherwise, enums for pointer-only sum types with *struct{}. Undecided zero-size payloads (struct{}, sync.Mutex/RWMutex locks) and unknown types emit !todo_unit / !todo sentinels that fail compilation on purpose, so every remaining gap is a loud build error instead of a silently compiling unit; grep counts the debt. The tools/ tree (customlint and friends) translates into tsox_tools mirroring the go layout, and the lsproto structcodec skip list is gone, so every inventory struct converts. Qualified-name resolution disambiguates same-named packages (the customlint tspath testdata shadow) by longest common directory prefix with the caller. The tsox_compat package grows to 22 modules: json v2 family, xml, zip, x/text family, xxh3, errgroup, testing, go/ast, go/token, go/types, reflect and the x/tools go/analysis family (analysis, inspector, ctrlflow, packages), wired through std_type so tools structs map analysis.Pass, ast.Node, types.Type and friends.210ce74958toeb9abd7993