docs: add WASM plugin debugging section to CONTRIBUTING.md#72
docs: add WASM plugin debugging section to CONTRIBUTING.md#72staging-devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Co-Authored-By: mokshitjain2006+coggitgrant0704 <mokshitjain2006@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review: PR #72 — Add WASM Plugin Debugging Section to CONTRIBUTING.mdOverall AssessmentDocumentation-only change. The content is useful and fills a real gap in the contributing guide. A few accuracy and completeness issues below. 🟡 Accuracy / Edge Cases1. The docs suggest: cd packages/typewind
cargo build-wasi --release && cp target/wasm32-wasip1/release/typewind_swc.wasm dist
2. Snapshot path is correct ✓ The documented path 3. The docs state these macros "are fully functional" because of the WASI target. This is true when running under 4. Missing mention of The docs say to run 🟢 Minor / Nits5. Grammatical issue in existing text (pre-existing) The existing line above the new section says:
Should be: "You can update the test suite snapshot" Since this PR is touching 6. Consider adding a "Common pitfalls" subsection A brief mention of common issues would be helpful:
SummaryGood documentation addition. The content is accurate for the common case. Adding clarifications about the custom cargo alias and WASI runtime variability would make it more robust for new contributors. |
Summary
Adds a new "Debugging the WASM plugin" section to
CONTRIBUTING.mdcovering:println!(),eprintln!(), anddbg!()in the Rust visitor code, and why they work (WASI target vswasm32-unknown-unknown).cargo test -- --nocaptureand the caveat that#[plugin_transform]is not invoked by thetest!()macro.__swc_snapshots__directory and how to update snapshots withUPDATE=1 cargo test.Review & Testing Checklist for Human
cargo test -- --nocaptureshows output as described)packages/typewind/tests/__swc_snapshots__/swc/lib.rs/is correctNotes
Documentation-only change — no code changes.
Link to Devin session: https://staging.itsdev.in/sessions/1673ddc0f2804c9e8c973b134923910c
Requested by: @Mokshit06