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

[Bug]: Bindgen tool generates incorrect code #42624

Closed
hasithaa opened this issue Apr 24, 2024 · 2 comments · Fixed by #42631
Closed

[Bug]: Bindgen tool generates incorrect code #42624

hasithaa opened this issue Apr 24, 2024 · 2 comments · Fixed by #42631
Assignees
Labels
Area/Bindgen Ballerina bindgen tool Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Status/Blocked Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Milestone

Comments

@hasithaa
Copy link
Contributor

Description

Bindgen tool generates a code with compilation errors.

Steps to Reproduce

  1. Create a project
  2. Inside the project execute bal bindgen -mvn com.github.jknack:handlebars:4.3.1 --public com.github.jknack.handlebars.Handlebars com.github.jknack.handlebars.Template
  3. Compiler the project.
Compiling source
        hasitha/test:0.1.0
ERROR [modules/com.github.jknack.handlebars/Template.bal:(41:20,41:46)] incompatible types: expected '(string|hasitha/test.java.io:0.1.0:IOException)', found 'string?'
ERROR [modules/com.github.jknack.handlebars/Template.bal:(68:20,68:46)] incompatible types: expected '(string|hasitha/test.java.io:0.1.0:IOException)', found 'string?'
error: compilation contains errors

Affected Version(s)

Update9 RC1

OS, DB, other environment details and versions

No response

Related area

-> Bindgen Tool

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Area/Bindgen Ballerina bindgen tool labels Apr 24, 2024
@keizer619
Copy link
Member

This is happening in 2201.8.6 as well

@NipunaRanasinghe
Copy link
Contributor

@hasithaa @keizer619 Ack. I'll look into this and, will update with the progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Bindgen Ballerina bindgen tool Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Status/Blocked Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Projects
Archived in project
4 participants