按源标记Python绑定编译覆盖
结论:依据 LinuxCNC RS274 Python/Boost.Python 绑定源 canonmodule.cc、gcodemodule.cc、interpmodule.cc 与 py*.cc,blocker 分析新增 python-compile-covered 分组,锁定这些 blocker 已由 inert Python C API symbol probe 编译覆盖;Python/remap 执行仍保持禁用,未扩展 smoke。 检查:./test-linuxcnc-wasm-python-c-api-symbols.sh;./test-linuxcnc-wasm-blockers.sh linuxcnc-rs274-wasm-source-files.txt;CNC_SIM_WASM_BLOCKERS_SELF_CHECKS=1 ./test-linuxcnc-wasm-blockers.sh linuxcnc-rs274-wasm-source-files.txt;./check-linuxcnc-wasm-blockers-source-map.sh;./test-native.sh;./test-linuxcnc-source-link.sh。
This commit is contained in:
@@ -17,6 +17,7 @@ LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"
|
||||
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
|
||||
|
||||
python_blockers=()
|
||||
python_compile_covered=()
|
||||
core_python_sources=()
|
||||
dlopen_blockers=()
|
||||
core_dlopen_sources=()
|
||||
@@ -61,6 +62,10 @@ wasm_safe_shim_in_build() {
|
||||
return 1
|
||||
}
|
||||
|
||||
python_compile_probe_covers() {
|
||||
grep -F "$1" test-linuxcnc-wasm-python-c-api-symbols.sh >/dev/null
|
||||
}
|
||||
|
||||
core_sources=()
|
||||
blocked_sources=()
|
||||
manifest_line_number=0
|
||||
@@ -134,6 +139,9 @@ scan_source() {
|
||||
if grep -Eq 'Python\.h|boost/python|pythonplugin|PyObject|PyInit_' "$full_path"; then
|
||||
if [[ "$group" == "blocked" ]]; then
|
||||
python_blockers+=("$path")
|
||||
if python_compile_probe_covers "$path"; then
|
||||
python_compile_covered+=("$path")
|
||||
fi
|
||||
else
|
||||
core_python_sources+=("$path")
|
||||
fi
|
||||
@@ -192,6 +200,7 @@ echo "blocked=$blocked_count"
|
||||
echo
|
||||
|
||||
print_group "python" "${python_blockers[@]}"
|
||||
print_group "python-compile-covered" "${python_compile_covered[@]}"
|
||||
print_group "dlopen" "${dlopen_blockers[@]}"
|
||||
print_group "tooldata" "${tooldata_blockers[@]}"
|
||||
print_group "tooldata-users" "${shimmed_tooldata_users[@]}"
|
||||
|
||||
@@ -84,6 +84,7 @@ expected_counts = {
|
||||
"manifest-core": "core=26",
|
||||
"manifest-blocked": "blocked=9",
|
||||
"python": 8,
|
||||
"python-compile-covered": 8,
|
||||
"tooldata": 1,
|
||||
"native-backend": 1,
|
||||
"native-fs": 1,
|
||||
@@ -111,6 +112,8 @@ if sections.get("dlopen") != ["(none)"]:
|
||||
raise SystemExit("blocked dlopen section is no longer empty")
|
||||
if sections.get("tooldata-users") != ["(none)"]:
|
||||
raise SystemExit("blocked tooldata-users section is no longer empty")
|
||||
if sections.get("python") != sections.get("python-compile-covered"):
|
||||
raise SystemExit("blocked Python sources are no longer fully compile-covered by the inert Python C API probe")
|
||||
|
||||
shim_paths = set(Path(line).as_posix() for line in subprocess.check_output(
|
||||
["./list-linuxcnc-wasm-safe-shims.sh"],
|
||||
@@ -166,6 +169,7 @@ for phrase in [
|
||||
'parameter-file replacement through `filename + ".new"`',
|
||||
"O-word lookup and parameter-file replacement",
|
||||
"Python/Boost.Python remap paths remain tracked blockers",
|
||||
"Python/Boost.Python blockers are compile-covered by the inert Python C API probe",
|
||||
"./check-linuxcnc-wasm-blockers-source-map.sh",
|
||||
"does not interpret G-code",
|
||||
]:
|
||||
|
||||
@@ -8,6 +8,9 @@ a source-link/build guard only; it does not add CNC behavior and must not become
|
||||
|
||||
- `src/emc/rs274ngc/gcodemodule.cc`, `canonmodule.cc`, `interpmodule.cc`, and
|
||||
`py*.cc` provide the Python and Boost.Python module binding blockers.
|
||||
- `test-linuxcnc-wasm-python-c-api-symbols.sh` compiles the blocked
|
||||
Python/Boost.Python binding sources with inert Python/runtime shims so their
|
||||
source surface is covered without enabling Python execution.
|
||||
- `src/emc/rs274ngc/interp_python.cc`, `interp_remap.cc`,
|
||||
`interp_namedparams.cc`, `interp_o_word.cc`, `interp_setup.cc`, and
|
||||
`rs274ngc_pre.cc` keep Python/Boost.Python remap paths as shimmed core
|
||||
@@ -35,6 +38,7 @@ a source-link/build guard only; it does not add CNC behavior and must not become
|
||||
| Analyzer section | Count | Boundary |
|
||||
| --- | ---: | --- |
|
||||
| `python` | 8 | Blocked Python/Boost.Python module sources. |
|
||||
| `python-compile-covered` | 8 | Blocked Python/Boost.Python module sources compiled by the inert Python C API symbol probe while remaining blockers. |
|
||||
| `dlopen` | 0 | blocked `dlopen` and blocked tooldata-users remain empty. |
|
||||
| `tooldata` | 1 | Native tooldata mmap blocker. |
|
||||
| `tooldata-users` | 0 | Blocked tooldata user sources remain empty. |
|
||||
@@ -80,6 +84,9 @@ Required tracked core examples:
|
||||
blocked-source replacements stay executable failures.
|
||||
- The WASM blockers source-map guard validates LinuxCNC source/blocker
|
||||
ownership and manifest drift only; it does not interpret G-code.
|
||||
- Python/Boost.Python blockers are compile-covered by the inert Python C API probe,
|
||||
but they remain tracked blockers until Python/remap execution is ported,
|
||||
wrapped, or replaced by a source-backed browser-safe LinuxCNC adaptation.
|
||||
|
||||
## Checks
|
||||
|
||||
|
||||
@@ -195,6 +195,14 @@ grep -F "src/emc/rs274ngc/gcodemodule.cc" <<<"$(sed -n '/^\[python\]/,/^$/p' <<<
|
||||
grep -F "src/emc/rs274ngc/interpmodule.cc" <<<"$(sed -n '/^\[python\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/pyarrays.cc" <<<"$(sed -n '/^\[python\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/pyparamclass.cc" <<<"$(sed -n '/^\[python\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "[python-compile-covered]" <<<"$output" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/canonmodule.cc" <<<"$(sed -n '/^\[python-compile-covered\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/gcodemodule.cc" <<<"$(sed -n '/^\[python-compile-covered\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/interpmodule.cc" <<<"$(sed -n '/^\[python-compile-covered\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/pyarrays.cc" <<<"$(sed -n '/^\[python-compile-covered\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "src/emc/rs274ngc/pyparamclass.cc" <<<"$(sed -n '/^\[python-compile-covered\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F 'python_compile_probe_covers "$path"' analyze-linuxcnc-wasm-blockers.sh >/dev/null
|
||||
grep -F 'test-linuxcnc-wasm-python-c-api-symbols.sh' analyze-linuxcnc-wasm-blockers.sh >/dev/null
|
||||
grep -F "[dlopen]" <<<"$output" >/dev/null
|
||||
grep -F "(none)" <<<"$(sed -n '/^\[dlopen\]/,/^$/p' <<<"$output")" >/dev/null
|
||||
grep -F "[tooldata]" <<<"$output" >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user