按推荐建议,继续执行
结论:新增 standalone CNC 语义守卫,禁止在 wrapper/tools/tests 中重新定义 Interp::convert_g(),确保 G-code 转换继续走 vendored LinuxCNC interp_convert.cc。
This commit is contained in:
@@ -488,6 +488,11 @@ Current verified progress:
|
|||||||
script compares that map against every `.c` and `.cc` entry in
|
script compares that map against every `.c` and `.cc` entry in
|
||||||
`tools/source-manifest.txt`, so future LinuxCNC source additions fail
|
`tools/source-manifest.txt`, so future LinuxCNC source additions fail
|
||||||
validation unless they also get an explicit standalone source compile probe.
|
validation unless they also get an explicit standalone source compile probe.
|
||||||
|
- `tools/verify_no_standalone_cnc_semantics.sh` now guards against
|
||||||
|
reintroducing a standalone `Interp::convert_g()` definition outside
|
||||||
|
`vendor/linuxcnc/`. This keeps G-code group conversion on the vendored
|
||||||
|
LinuxCNC `interp_convert.cc` path instead of allowing the wrapper layer to
|
||||||
|
grow another project-authored conversion implementation.
|
||||||
|
|
||||||
## Phase 4: Port INI Parsing Without Editing Upstream
|
## Phase 4: Port INI Parsing Without Editing Upstream
|
||||||
|
|
||||||
@@ -786,8 +791,8 @@ Keep these documents under `wasm-port/docs/`:
|
|||||||
Continue expanding the standalone interpreter core from the verified minimal
|
Continue expanding the standalone interpreter core from the verified minimal
|
||||||
traverse path:
|
traverse path:
|
||||||
|
|
||||||
1. replace the temporary minimal `convert_g()` implementation with calls into
|
1. keep `convert_g()` execution on vendored LinuxCNC interpreter conversion
|
||||||
vendored LinuxCNC interpreter conversion code.
|
code and reject any new standalone `Interp::convert_g()` implementation.
|
||||||
2. identify and shim the native runtime symbols blocking direct compilation of
|
2. identify and shim the native runtime symbols blocking direct compilation of
|
||||||
`interp_convert.cc`, `interp_execute.cc`, and related interpreter files.
|
`interp_convert.cc`, `interp_execute.cc`, and related interpreter files.
|
||||||
3. keep fixture coverage as regression protection while deleting temporary
|
3. keep fixture coverage as regression protection while deleting temporary
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ CANON_ERROR_FIXTURE_DIR="$ROOT_DIR/tests/fixtures/canon_errors"
|
|||||||
NAMEDPARAM_INI_FIXTURE="$ROOT_DIR/tests/fixtures/ini/namedparams.ini"
|
NAMEDPARAM_INI_FIXTURE="$ROOT_DIR/tests/fixtures/ini/namedparams.ini"
|
||||||
|
|
||||||
"$ROOT_DIR/tools/verify_vendor_sync.sh"
|
"$ROOT_DIR/tools/verify_vendor_sync.sh"
|
||||||
|
"$ROOT_DIR/tools/verify_no_standalone_cnc_semantics.sh"
|
||||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||||
|
|
||||||
check_source_probe_coverage() {
|
check_source_probe_coverage() {
|
||||||
|
|||||||
26
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
Executable file
26
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
|
||||||
|
TMP_FILE="$(mktemp)"
|
||||||
|
trap 'rm -f "$TMP_FILE"' EXIT
|
||||||
|
|
||||||
|
find \
|
||||||
|
"$ROOT_DIR/runtime" \
|
||||||
|
"$ROOT_DIR/tests" \
|
||||||
|
"$ROOT_DIR/tools" \
|
||||||
|
-type f \
|
||||||
|
\( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hh' -o -name '*.hpp' -o -name '*.js' -o -name '*.ts' \) \
|
||||||
|
! -path "$ROOT_DIR/vendor/*" \
|
||||||
|
! -path "$ROOT_DIR/runtime/ui/ini-panel/linuxcnc_ini.js" \
|
||||||
|
-print0 |
|
||||||
|
xargs -0 grep -nE '^[[:space:]]*int[[:space:]]+Interp::convert_g[[:space:]]*\(' > "$TMP_FILE" || true
|
||||||
|
|
||||||
|
if [[ -s "$TMP_FILE" ]]; then
|
||||||
|
echo "standalone Interp::convert_g definitions are not allowed:" >&2
|
||||||
|
cat "$TMP_FILE" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "standalone CNC semantics guard complete"
|
||||||
Reference in New Issue
Block a user