Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Method Size Too Large #43682

Open
Ajai-Suvendran opened this issue Dec 4, 2024 · 1 comment
Open

[Improvement]: Method Size Too Large #43682

Ajai-Suvendran opened this issue Dec 4, 2024 · 1 comment
Assignees
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Improvement userCategory/Compilation

Comments

@Ajai-Suvendran
Copy link

Ajai-Suvendran commented Dec 4, 2024

Description

During the compilation of a Ballerina program, the following error occurs:
ERROR [main.bal:(27:1,92:3)] method is too large: 'transformPacs009ToMt202COV'
error: compilation contains errors
This error indicates that the method transformPacs009ToMt202COV has exceeded the allowable size limit, likely due to an extensive number of operations or code complexity. This limitation could pose challenges for projects requiring large transformation logic in a single method.

Affected Version:
Ballerina 2201.10.1

test (2).zip
Use this to reproduce the error.

Describe your problem(s)

No response

Describe your solution(s)

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 4, 2024
@Ajai-Suvendran Ajai-Suvendran changed the title [Improvement]: Method Size Too Large for Function [Improvement]: Method Size Too Large Dec 4, 2024
@warunalakshitha warunalakshitha self-assigned this Dec 17, 2024
@HindujaB
Copy link
Contributor

The cause of the issue is similar to #43710.
According to #43710 (comment), we need to refactor the code by introducing local variables and moving them to separate functions.

@HindujaB HindujaB added Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime and removed needTriage The issue has to be inspected and labeled manually labels Dec 18, 2024
@warunalakshitha warunalakshitha moved this to Planned for Sprint in Ballerina Team Main Board Dec 19, 2024
@warunalakshitha warunalakshitha moved this from Planned for Sprint to In Progress in Ballerina Team Main Board Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Improvement userCategory/Compilation
Projects
Status: In Progress
Development

No branches or pull requests

5 participants