Repository navigation
fix(tools): validate compiler path before checking case sources (#655) - #666
Conversation
LunaStev
left a comment
There was a problem hiding this comment.
Thanks for the contribution. The overall direction matches #655, but there are a few cases that should be fixed before merging:
-
validate_compiler()only checks executable permission on POSIX (os.name != "nt"). On Windows, any existing regular file can pass validation even if it is not actually launchable, which can still fall back to repeated per-source launch failures. Please make the preflight validation satisfy the issue requirement on Windows as well, or otherwise ensure an unusable compiler is rejected before any source command is attempted. -
A truly empty compiler argument is not detected by the current check.
Path("")becomesPath("."), soif not str(raw).strip()does not catch"". Please validate the raw string before converting it toPath, and add a regression test for an actual empty string rather than only whitespace. -
#665 introduces the atomic report writer for this same tool. After that change lands, please rebase/update this PR and use the shared atomic report path for the new top-level compiler-validation error report as well, so this new error path does not reintroduce direct writes to the final JSON path.
Also, please keep the existing module docstring unless there is a specific reason to remove it.
3e07903 to
258174b
Compare
|
Thanks for the thorough review @LunaStev! I have updated the PR to address all points:
|
Summary
Fixes #655
When \ ools/check_case_sources.py\ is invoked with an invalid, non-existent, or non-executable compiler path, it previously walked the entire case manifest and repeatedly failed launching each source file instead of failing early with a single top-level configuration error.
Changes
esults\ list and records the configuration error.
Verification