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

Cannot pull some ballerinax packages with U11 #43816

Closed
nipunayf opened this issue Feb 13, 2025 · 9 comments · Fixed by #43932
Closed

Cannot pull some ballerinax packages with U11 #43816

nipunayf opened this issue Feb 13, 2025 · 9 comments · Fixed by #43932
Assignees
Labels
Area/ProjectAPI Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug

Comments

@nipunayf
Copy link
Contributor

nipunayf commented Feb 13, 2025

Description

$title as I’m getting the following error for packages like github, snowflake, docusign.dsadmin, etc.

error: error while generating method 'readln' in class 'ballerina/io/1/read'

Note that the issue only persists with U11, and works for U10.

Steps to Reproduce

Execute bal pull ballerinax/docusign.dsadmin

Version

U11

Environment Details (with versions)

No response

@nipunayf nipunayf changed the title Cannot pull the docuSign.dsadmin module with U11 Cannot pull the docusign.dsadmin module with U11 Feb 13, 2025
@nipunayf nipunayf changed the title Cannot pull the docusign.dsadmin module with U11 Cannot pull the some ballerinax packages with U11 Feb 13, 2025
@TharmiganK TharmiganK transferred this issue from ballerina-platform/ballerina-library Feb 13, 2025
@TharmiganK
Copy link
Contributor

ballerinax/docusign.dsadmin is platform: any package, so the expectation is that it should work with the update 11 as well. But it seems like after pulling the package, the failure happens in the initial BIR generation.

@TharmiganK
Copy link
Contributor

I debugged the bal pull command and it hit this code:

throw new BLangCompilerException("error while generating method '" + Utils.decodeIdentifier(funcName) +

Exception:
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0

@azinneera
Copy link
Contributor

@nipunayf can you check the ballerina/io version that is being pulled??

@nipunayf nipunayf changed the title Cannot pull the some ballerinax packages with U11 Cannot pull some ballerinax packages with U11 Feb 13, 2025
@nipunayf
Copy link
Contributor Author

@nipunayf can you check the ballerina/io version that is being pulled??

It pulled 1.7.0

@azinneera
Copy link
Contributor

Description

$title as I’m getting the following error for packages like github, snowflake, docusign.dsadmin, etc.

error: error while generating method 'readln' in class 'ballerina/io/1/read'

I could reproduce this error for github package but the version I got for ballerina/io is 1.6.1 which is expected. The reason is that bal pull command runs in sticky=true mode by default. Passing --sticky=false resolved the issue. When the sticky flag is set to false, it will resolve to the latest io version compatible with U11.

@nipunayf can you check the ballerina/io version that is being pulled??

It pulled 1.7.0

1.7.0 is expected to be resolved only if --sticky=false is set. Also, since io:1.7.0 is packed in the distribution, the expected behavior is that it shouldn't get pulled. I could test and verify this behavior. @nipunayf could you please double-check and confirm if the ballerina/io version is 1.6.x or 1.7.0?

@azinneera
Copy link
Contributor

We can improve the pull command to run on sticky=false mode by default to avoid this error. @sameerajayasoma WDYT?

@TharmiganK
Copy link
Contributor

TharmiganK commented Feb 14, 2025

could you please double-check and confirm if the ballerina/io version is 1.6.x or 1.7.0?

It pulled 1.6.x for me

@nipunayf
Copy link
Contributor Author

Description

$title as I’m getting the following error for packages like github, snowflake, docusign.dsadmin, etc.

error: error while generating method 'readln' in class 'ballerina/io/1/read'

I could reproduce this error for github package but the version I got for ballerina/io is 1.6.1 which is expected. The reason is that bal pull command runs in sticky=true mode by default. Passing --sticky=false resolved the issue. When the sticky flag is set to false, it will resolve to the latest io version compatible with U11.

@nipunayf can you check the ballerina/io version that is being pulled??

It pulled 1.7.0

1.7.0 is expected to be resolved only if --sticky=false is set. Also, since io:1.7.0 is packed in the distribution, the expected behavior is that it shouldn't get pulled. I could test and verify this behavior. @nipunayf could you please double-check and confirm if the ballerina/io version is 1.6.x or 1.7.0?

It pulled 1.6.x, and adding the --sticky=false resolved the issue

Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/ProjectAPI Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants