Add support for Ballerina Interpreter v0.5.0 - #18
Conversation
|
Warning Review limit reached
More reviews will be available in 41 minutes and 41 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refactors the Ballerina WASM runtime to load projects via ChangesBallerina WASM Runtime and Platform Refactoring
Node.js WASM Bridge Timeout Management
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/ballerina-wasm/pal_wasm.go (1)
52-72: 💤 Low valueSilent fallback when
AbortControlleris unavailable.If
setupTimeoutfails (e.g.,AbortControllernot available in the environment), the error is silently ignored and the request proceeds without timeout protection. Consider logging or returning an error to make this behavior explicit.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ballerina-wasm/pal_wasm.go` around lines 52 - 72, The buildFetchOptions function currently swallows setupTimeout errors (e.g., missing AbortController) which results in silent no-timeout requests; change buildFetchOptions to surface that failure by returning (map[string]any, error) instead of just map[string]any, call setupTimeout and if it errors return the partially built options with the error (or nil options with the error) so callers can decide, or alternatively log the error explicitly (using the client's logger on fetchHTTPClient) before proceeding; update all callers of buildFetchOptions (e.g., the HTTP request entrypoint that invokes buildFetchOptions) to handle the new error return and either abort or proceed with explicit warning so the lack of timeout is not silent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/ballerina-wasm/pal_wasm.go`:
- Around line 52-72: The buildFetchOptions function currently swallows
setupTimeout errors (e.g., missing AbortController) which results in silent
no-timeout requests; change buildFetchOptions to surface that failure by
returning (map[string]any, error) instead of just map[string]any, call
setupTimeout and if it errors return the partially built options with the error
(or nil options with the error) so callers can decide, or alternatively log the
error explicitly (using the client's logger on fetchHTTPClient) before
proceeding; update all callers of buildFetchOptions (e.g., the HTTP request
entrypoint that invokes buildFetchOptions) to handle the new error return and
either abort or proceed with explicit warning so the lack of timeout is not
silent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f99a1b66-e267-4945-b3ec-3d20696bd2e2
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.lockpackages/ballerina-wasm/go.sumis excluded by!**/*.sum
📒 Files selected for processing (7)
packages/ballerina-wasm/ballerina-lang-gopackages/ballerina-wasm/diagnostic_printer.gopackages/ballerina-wasm/go.modpackages/ballerina-wasm/main_wasm.gopackages/ballerina-wasm/pal_wasm.gopackages/balrun/package.jsonpackages/balrun/src/wasm-bridge.ts
Introduce PAL including proper stdout, stderr handling and HTTP support with fetch API.
Resolves #15
Summary by CodeRabbit
New Features
Bug Fixes
Chores