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]: Bal CLI tool to cannot be written in ballerina #42729

Open
niveathika opened this issue May 10, 2024 · 1 comment
Open

[Improvement]: Bal CLI tool to cannot be written in ballerina #42729

niveathika opened this issue May 10, 2024 · 1 comment
Assignees
Labels
Area/ProjectAPI Priority/High Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Improvement

Comments

@niveathika
Copy link
Contributor

niveathika commented May 10, 2024

Description

Currently, the bal tools need to be in java.

This is a restriction since logic cannot be written in ballerina as we have done in edi-tool (ballerina-platform/ballerina-library#6473). Due to this we need a java dependency.

We need a way to write a tool in ballerina

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels May 10, 2024
@niveathika niveathika changed the title [Improvement]: Bal tool to be written in ballerina [Improvement]: Bal CLI tool to cannot be written in ballerina May 20, 2024
@azinneera azinneera added Priority/High Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Area/ProjectAPI and removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels May 21, 2024
@azinneera
Copy link
Contributor

As per the offline discussion with @niveathika the requirement of Java for the execution of the tool is because of the way the tool's execution is written. Since the tool is written in Ballerina, an executable JAR is built and it is executed via a ProcessBuilder using the java -jar command. This is the reason for the dependency on Java.

The most ideal solution would be to be able to support tools written in Ballerina but this is not feasible to do in the near future since all the compiler APIs are written in Ballerina.

An alternative solution would be to use the JDK packed with the distribution. For this, we would need to introduce a bal command to get the JDK path used for the particular distribution which can be used to execute the EDI tool. @keizer619 @sameerajayasoma WDYT?

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

No branches or pull requests

3 participants