Skip to content

Bump Ballerina interpreter and add multi-module support#32

Merged
warunalakshitha merged 2 commits intoballerina-platform:mainfrom
snelusha:chore/bump-v0.4.0
Apr 6, 2026
Merged

Bump Ballerina interpreter and add multi-module support#32
warunalakshitha merged 2 commits intoballerina-platform:mainfrom
snelusha:chore/bump-v0.4.0

Conversation

@snelusha
Copy link
Copy Markdown
Contributor

@snelusha snelusha commented Apr 6, 2026

Purpose

$subject

Overview

This pull request updates the Ballerina interpreter to version 0.4.0 and extends the WASM runtime to support multi-module compilation and interpretation.

Changes

Dependency Update

  • Updated the ballerina-lang-go submodule to incorporate improvements in the Ballerina interpreter for version 0.4.0

Multi-Module Support

  • Modified the WASM runtime's run function in main_wasm.go to handle multiple BIR packages instead of a single module
  • Replaced the single backend.BIR() call with backend.BIRPackages() to retrieve all compiled packages
  • Updated the interpretation loop to iterate through each returned BIR package and interpret them sequentially
  • Enhanced error handling to validate that packages were successfully produced and report appropriately if none are available

These changes enable the Ballerina playground to support projects with multiple interdependent modules, improving the capability of the WASM-based runtime.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd0efafb-37a0-4037-b519-30b95ada068f

📥 Commits

Reviewing files that changed from the base of the PR and between e135d30 and b0d708d.

📒 Files selected for processing (2)
  • packages/wasm/ballerina-lang-go
  • packages/wasm/main_wasm.go

📝 Walkthrough

Walkthrough

The packages/wasm directory receives two updates: a submodule reference bump for ballerina-lang-go and a modification to main_wasm.go that shifts BIR handling from processing a single module to iterating through multiple BIR packages with enhanced error checking.

Changes

Cohort / File(s) Summary
Submodule Update
packages/wasm/ballerina-lang-go
Submodule commit reference updated to a newer version (840d581...ae2382f...).
BIR Package Processing
packages/wasm/main_wasm.go
Changed BIR handling in run function from single backend.BIR() call to backend.BIRPackages() iteration. Added validation for empty package slice with descriptive error. Now processes each BIR package individually via loop instead of single interpretation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • warunalakshitha

Poem

🐰 Multiple packages hop into sight,
Where once there stood a single bite,
The BIR now dances, loop by loop,
No empty packages in our coop!
A submodule springs to newer ground,
Our WASM dreams more tightly bound.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete, containing only a single placeholder line ('$subject') in the Purpose section and missing all other required template sections (Goals, Approach, User stories, Release note, Documentation, etc.). Complete the PR description by filling out all required sections from the template, including Goals, Approach, User stories, Release note, and other mandatory sections with appropriate details about the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main changes: bumping the Ballerina interpreter and adding multi-module support, which matches the commit messages and code modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@snelusha snelusha requested a review from warunalakshitha April 6, 2026 18:05
Copy link
Copy Markdown
Contributor

@warunalakshitha warunalakshitha left a comment

Choose a reason for hiding this comment

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

LGTM

@warunalakshitha warunalakshitha merged commit 803be93 into ballerina-platform:main Apr 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants