Skip to content

build: isolate build trees and add dry-run validation - #46

Merged
shaohaozhi286 merged 2 commits into
masterfrom
improve/build-dry-run
Sep 9, 2026
Merged

build: isolate build trees and add dry-run validation#46
shaohaozhi286 merged 2 commits into
masterfrom
improve/build-dry-run

Conversation

@LIUXIN557

Copy link
Copy Markdown
Collaborator

Summary

@shaohaozhi286 shaohaozhi286 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发现 2 个需要修复的行为回归,建议修改后再合并。验证:verify_package_unit_test.py 6/6、dev_desktop_test.py 5/5 通过;本机 MSBuild 实测 -j 4 报 MSB1001;临时目录复现默认 --list 漏掉 macOS 构建产物。CI 的 TerminalResolverPosixTest.BrokenLoginShellFallsBackToBash 和 ToolchainsDetectTest.DetectsDirectoriesAndSkipsStoreStub 在主干 run 34356121713 也失败,不将这两项作为本 PR 回归。

if not run_tool(report, f"cmake build {cmake_target}",
[cmake, "--build", str(build_dir), "--config", "MinSizeRel",
"--target", cmake_target]):
"--target", cmake_target, "--", "-j", str(jobs)]):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] 使用 CMake 通用并行参数,避免 Windows/MSBuild 构建必然失败。此函数在 Windows 明确保留 Visual Studio 生成器,但新增的 -- -j <jobs> 会原样传给 MSBuild;本机实际运行得到 MSBUILD : error MSB1001: 未知开关 -j。发布脚本新增的构建命令也有同样问题。建议统一改成 CMake 自身的 --parallel <jobs>,同步四份 verifier 和发布脚本,并增加 Visual Studio 生成器验证。当前单测只断言参数包含 -j,因此没有发现真实构建失败。

Comment thread scripts/dev_desktop.py
parser.add_argument("--no-build", action="store_true", help="跳过 web 构建,直接启动 desktop")
parser.add_argument("--list", action="store_true", help="列出可用的 desktop 构建产物并退出")
parser.add_argument("--build-dir", type=str, default=None, help="指定 desktop 构建目录(相对于项目根或绝对路径)")
parser.add_argument("--build-dir", type=str, default="build/windows-x64-dev", help="指定 desktop 构建目录(相对于项目根或绝对路径)")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 保留默认的跨平台构建产物发现。将 --build-dir 默认值设为 build/windows-x64-dev 后,所有平台的默认启动及 --list 都只扫描该目录,原先 build/macos-arm64-release/ACECode.app、build/Release 等现有布局不再被找到。我用临时目录放置 build/macos-arm64-release/ACECode.app,默认 --list 返回未找到,显式 --build-dir build 才找到。建议未指定参数时继续扫描 build 根目录,可优先选择 windows-x64-dev;仅显式传参时限制搜索范围,并覆盖 CLI 默认入口测试。

@shaohaozhi286
shaohaozhi286 merged commit b40c514 into master Sep 9, 2026
1 check failed
@shaohaozhi286

Copy link
Copy Markdown
Collaborator

已随集成分支合并到 master,修复提交:2b68a67235740966257a51be353f0f098acf03c6。构建、验证和发布命令统一使用 CMake --parallel;默认 desktop 入口恢复扫描整个 build 根目录。7 项 verifier 测试和 6 项 desktop 测试通过,包含真实 MSBuild 构建及默认 CLI 跨平台发现。

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