Repository navigation
ci: Port the w32-pthreads Digital Mars build helper to Python (#962) - #2613
Conversation
zackees
left a comment
There was a problem hiding this comment.
Review: correct, and the test is the right kind for a file with no caller.
What I checked.
- The port is token-for-token:
RELEASE/DEBUGinci/test_w32_pthreads_builddmc.pymatchbuilddmc.bat's twodmclines exactly, including-I.;c:\dm\includeand theuser32.lib+kernel32.lib+wsock32.liblink list. Nothing is silently dropped. - The
%errorlevel%behaviour is preserved and pinned: the batch left the last command's status, so returning the debug command's exit code (test_main_reports_the_last_command_status, return 7) is right, and it is tested rather than asserted in prose. - Wiring is complete in one PR: the
.batis deleted,ci.tomlloses itsGEN-005exception, andWiringTestfails if either comes back.git grep builddmc.batreturns no caller, which matches the issue's claim that the ChangeLog is its only reference. - No
docs/features.mdline: vendored build helper, not user-visible.
Verified: uv run python -m unittest ci.test_w32_pthreads_builddmc ci.test_ci_toml ci.test_ported_sources ci.test_uv_run → 31 tests OK; ruff check clean on both new files.
One note for the burn-down, not a blocker: builddmc.py keeps the hard-coded c:\dm\bin\dmc. That is what the batch did, so this PR is faithful — but it is also why the file can never run in CI. If a later unit wants to actually exercise it, the tool path needs an argument or an env var; that would be a behaviour change and belongs in its own issue, not here.
Queuing once its checks are green.
8d85e97 to
23ea7bc
Compare
…on (#962) GREEN: deps/w32-pthreads/builddmc.py replaces builddmc.bat, and its GEN-005 exception leaves ci.toml. The helper runs the same two dmc command lines, release then debug, token for token. It has no caller.
23ea7bc to
6e93325
Compare
|
Rebased onto |
|
Correction to the SHA I quoted above (I mistyped it): the rebased commits are RED |
Ports
deps/w32-pthreads/builddmc.bat(9 lines) todeps/w32-pthreads/builddmc.pyand removes itsGEN-005exception fromci.toml. Part of the #962 ci-lint burn-down.What the script is
The vendored w32-pthreads helper that builds the library with the Digital Mars Compiler. It has no caller: the library's
ChangeLog(its only reference) calls it "Windows bat file to build the library". Nothing else in the tree runs it, so no consumer changes.RED → GREEN
3e35a9250—ci/test_w32_pthreads_builddmc.pypins the module (the twodmccommand lines, token for token) and the wiring (.batgone, exception gone). Fails: the module does not exist, the.batis still present, the exception is still inci.toml.23ea7bca1— the port, the.batdeleted, theci.tomlexception removed.deps/w32-pthreads/builddmc.pyruns the same two command lines, release then debug, from the same constants;-gis the debug build's only addition.Behaviour kept: the batch file checked nothing between the two builds and leaves
%errorlevel%at the last command's status, somain()returns the debug command's exit status.Rebase
Rebased onto
origin/master(7f4109378) after a sibling port merged. The only conflict wasci.toml(adjacent[[exceptions]]blocks); resolved as master's list minus this unit's block, sogit diff origin/master -- ci.tomlshows only thedeps/w32-pthreads/builddmc.batblock gone. The SHAs above are the rebased ones.Evidence
uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint precheck—deps/w32-pthreads/builddmc.batno longer appears in the GEN-005 list, and the new.pyis clean.Local (on the rebased tip):
uv run python -m unittest ci.test_w32_pthreads_builddmc ci.test_ci_toml ci.test_no_sys_path_edits ci.test_uv_run ci.test_tool_guard ci.test_ci_tests_stdlib_only(56 tests) andruff checkon both new files — all pass.Refs #962.