From 9da6ffcd6a30090810ba53642d4c61958fc311fe Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 08:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=BD=E5=BF=AB=E6=8E=A8=E8=BF=9B=EF=BC=9A?= =?UTF-8?q?=E6=94=B6=E7=B4=A7=E6=B5=8F=E8=A7=88=E5=99=A8=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E8=BE=B9=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-linuxcnc-browser-app-source-map.sh | 6 ++++++ docs/linuxcnc-browser-app-source-map.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/check-linuxcnc-browser-app-source-map.sh b/check-linuxcnc-browser-app-source-map.sh index f173695..f183310 100755 --- a/check-linuxcnc-browser-app-source-map.sh +++ b/check-linuxcnc-browser-app-source-map.sh @@ -121,4 +121,10 @@ for entry in [ app = Path("web/src/app.js").read_text(encoding="utf-8") if "parse(" in app.replace("parseProgram", ""): raise SystemExit("browser app should route program execution through parseFileWithParameterFile, not direct parse") +if app.count("elements.backendSelect.value = linuxCncBackend;") != 2: + raise SystemExit("browser app backend selector must only be forced to the LinuxCNC backend") +if "backendSelect.value" in app.replace("elements.backendSelect.value = linuxCncBackend;", ""): + raise SystemExit("browser app must not read the backend selector as a dynamic backend source") +if 'backend: linuxCncBackend' not in app: + raise SystemExit("browser app parse options must force the LinuxCNC backend") PY diff --git a/docs/linuxcnc-browser-app-source-map.md b/docs/linuxcnc-browser-app-source-map.md index 822e8e4..46f8c68 100644 --- a/docs/linuxcnc-browser-app-source-map.md +++ b/docs/linuxcnc-browser-app-source-map.md @@ -37,6 +37,8 @@ must not expand the temporary smoke parser. - The app must require OPFS for browser program parsing and call `parseFileWithParameterFile(programPath, parameterPath, "linuxcnc", ...)`. - The visible backend selector must stay limited to the LinuxCNC RS274 backend. +- The app must not read the backend selector as a dynamic backend source; it + must force `linuxCncBackend` for browser parsing. - `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must run `./check-linuxcnc-browser-app-source-map.sh` before consuming app-backed browser artifacts or source-linked LinuxCNC objects.