Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make CI to run rustpython-without-js test
  • Loading branch information
youknowone committed Nov 17, 2025
commit 9134cca17b8f8059bcbd7de6cbed93544146060c
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,13 @@ jobs:
with: { wabt-version: "1.0.36" }
- name: check wasm32-unknown without js
run: |
cd wasm/wasm-unknown-test
cargo build --release --verbose
if wasm-objdump -xj Import target/wasm32-unknown-unknown/release/wasm_unknown_test.wasm; then
echo "ERROR: wasm32-unknown module expects imports from the host environment" >2
cd example_projects/wasm32_without_js/rustpython-without-js
cargo build
cd ..
if wasm-objdump -xj Import rustpython-without-js/target/wasm32-unknown-unknown/debug/rustpython_without_js.wasm; then
echo "ERROR: wasm32-unknown module expects imports from the host environment" >&2
fi
Comment on lines 406 to 412
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix shell redirect syntax error.

Line 410 uses >2 which will create a file named "2" instead of redirecting to stderr. The correct syntax is >&2.

Apply this diff:

           if wasm-objdump -xj Import rustpython-without-js/target/wasm32-unknown-unknown/debug/rustpython_without_js.wasm; then
-            echo "ERROR: wasm32-unknown module expects imports from the host environment" >2
+            echo "ERROR: wasm32-unknown module expects imports from the host environment" >&2
           fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: |
cd wasm/wasm-unknown-test
cargo build --release --verbose
if wasm-objdump -xj Import target/wasm32-unknown-unknown/release/wasm_unknown_test.wasm; then
cd example_projects/wasm32_without_js
cargo build --manifest-path rustpython-without-js/Cargo.toml
if wasm-objdump -xj Import rustpython-without-js/target/wasm32-unknown-unknown/debug/rustpython_without_js.wasm; then
echo "ERROR: wasm32-unknown module expects imports from the host environment" >2
fi
run: |
cd example_projects/wasm32_without_js
cargo build --manifest-path rustpython-without-js/Cargo.toml
if wasm-objdump -xj Import rustpython-without-js/target/wasm32-unknown-unknown/debug/rustpython_without_js.wasm; then
echo "ERROR: wasm32-unknown module expects imports from the host environment" >&2
fi
🤖 Prompt for AI Agents
.github/workflows/ci.yaml around lines 406 to 411: the shell redirection uses
`>2` which creates a file named "2" instead of redirecting to stderr; change the
redirection to `>&2` so the error message is written to stderr (i.e., replace
the `echo "ERROR: ... " >2` with `echo "ERROR: ... " >&2`).

cargo run --release --manifest-path wasm-runtime/Cargo.toml rustpython-without-js/target/wasm32-unknown-unknown/debug/rustpython_without_js.wasm
- name: build notebook demo
if: github.ref == 'refs/heads/release'
run: |
Expand Down
Loading