Skip to content

Comments

Use bLangTypeBase and bLangNodeBase in AST structs#192

Merged
heshanpadmasiri merged 2 commits intoballerina-platform:mainfrom
warunalakshitha:runtime_subset4
Feb 24, 2026
Merged

Use bLangTypeBase and bLangNodeBase in AST structs#192
heshanpadmasiri merged 2 commits intoballerina-platform:mainfrom
warunalakshitha:runtime_subset4

Conversation

@warunalakshitha
Copy link
Contributor

@warunalakshitha warunalakshitha commented Feb 24, 2026

Purpose

Fix build break due to struct name changes

Summary by CodeRabbit

  • Refactor
    • Updated internal type declarations to embed unexported base types, improving encapsulation and internal consistency without changing external behavior.
  • Style
    • Minor indentation/formatting tweak with no functional impact.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12390f2 and ed0fca8.

📒 Files selected for processing (1)
  • ast/node_builder.go
✅ Files skipped from review due to trivial changes (1)
  • ast/node_builder.go

📝 Walkthrough

Walkthrough

Three exported struct types were changed to embed unexported base types; two files also include a minor whitespace/indentation tweak and a manifest mention. No behavioral logic changes were introduced.

Changes

Cohort / File(s) Summary
Base Type Embedding Refactor
ast/expressions.go, ast/types.go
Replaced embeddings of exported base types with unexported counterparts: BLangMappingKey and BLangMappingKeyValueField now embed bLangNodeBase (was BLangNodeBase); BLangConstrainedType now embeds bLangTypeBase (was BLangTypeBase).
Minor formatting / manifest
ast/node_builder.go, go.mod
Whitespace/indentation adjustment in TransformTypeTestExpression (no logic change). go.mod referenced in manifest changeset.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 I nibbled at code, then gave a hop,
Three structs tucked in, a quieter stop,
Tabs aligned with a gentle tap,
A manifest winked on my map,
I dance — the AST hums, ready to hop! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and only provides a brief purpose statement. It is missing nearly all required template sections including Goals, Approach, User stories, Release notes, Documentation, Testing details, and other critical information. Expand the description to include Goals, Approach, Release note, and at minimum clarify why this struct base type change was necessary and what build break it resolves.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: replacing BLangTypeBase and BLangNodeBase with their unexported counterparts (bLangTypeBase and bLangNodeBase) in AST structs.
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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.14%. Comparing base (032a2a9) to head (ed0fca8).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
- Coverage   29.28%   29.14%   -0.15%     
==========================================
  Files         254      254              
  Lines       54319    54310       -9     
==========================================
- Hits        15908    15826      -82     
- Misses      37427    37508      +81     
+ Partials      984      976       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@heshanpadmasiri heshanpadmasiri left a comment

Choose a reason for hiding this comment

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

LGTM

@heshanpadmasiri heshanpadmasiri merged commit 1febadb into ballerina-platform:main Feb 24, 2026
5 of 6 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