Skip to content

Comments

Fix data mapping function detection to exclude regular and natural expression functions in data_mappings.bal#382

Open
dulajdilshan wants to merge 1 commit intoballerina-platform:1.4.xfrom
dulajdilshan:fix-data-mapping-functions
Open

Fix data mapping function detection to exclude regular and natural expression functions in data_mappings.bal#382
dulajdilshan wants to merge 1 commit intoballerina-platform:1.4.xfrom
dulajdilshan:fix-data-mapping-functions

Conversation

@dulajdilshan
Copy link
Contributor

@dulajdilshan dulajdilshan commented Oct 13, 2025

Purpose

Addresses wso2/product-ballerina-integrator#26

Fixed the issue where all functions in data_mappings.bal were incorrectly marked as data mapping functions. The fix ensures that only expression-bodied functions (excluding natural expression functions) are marked as data mapping functions.

All Cases Covered:

  1. Expression-bodied functions in data_mappings.bal (like transform, mapPersonToEmployee) → isDataMappedFunction: true
  2. Regular functions with block body in data_mappings.bal (like customHelper) → isDataMappedFunction: false
  3. Isolated functions in data_mappings.bal (like validateAge) → isDataMappedFunction: false
  4. Natural expression functions in data_mappings.bal (like generateGreeting) → Skipped entirely (not shown in results)
  5. Natural expression functions in functions.bal → Skipped entirely (existing behavior maintained)

Approach

Reference: wso2/product-ballerina-integrator#26 (comment)

@CLAassistant
Copy link

CLAassistant commented Oct 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@pasindufernando1 pasindufernando1 left a comment

Choose a reason for hiding this comment

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

LGTM

@dulajdilshan dulajdilshan force-pushed the fix-data-mapping-functions branch from 43888f3 to 3a93f78 Compare November 12, 2025 11:10
@dulajdilshan dulajdilshan changed the base branch from main to 1.4.x November 12, 2025 11:10
@dulajdilshan dulajdilshan reopened this Nov 12, 2025
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.

3 participants