Skip to content

fix: build action 的 ${mcpp.out_dir} 替换把原生拼写拼进用户正斜杠路径,产出混合分隔符 #393

Description

@ZheFeng7110

背景

#390 系列修复(PR #391)把 manifest/指令路径摄入点全部归一化为原生分隔符,并给 emit_compile_commands 加了 make_preferred 兜底。src/build/prepare.cppm:5045${mcpp.out_dir} 替换是同类里未清的一员:

rep("${mcpp.out_dir}", ctx.plan.outputDir.string());

用户写 ${mcpp.out_dir}/gen/x.cppm 时,outputDir.string()(原生反斜杠)拼进用户的正斜杠后缀 → C:\proj\target\...\gen/x.cppm 混合拼写。

影响面

这些 action 输出因为含 ${mcpp. 不会被 adoptActionOutputs 采纳成源,所以够不到 CDB,不会触发 #390 的 CLion 症状 —— 但若后续动作以 file 等路径字段消费,或混入其它通道,会重现同类问题。属清理项,不阻塞任何已发布修复。

建议

#390 同规则:make_preferred 归一化替换值,或在替换后对整串路径段归一化。附单测锁定 ${mcpp.out_dir} 类替换的拼写。

环境

  • Windows x86_64 + clang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions