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]: Allow the package build for empty projects when there are code generator tools #42583

Closed
gayaldassanayake opened this issue Apr 18, 2024 · 1 comment · Fixed by #42730
Assignees
Labels
Area/CLI-BuildTools Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Improvement

Comments

@gayaldassanayake
Copy link
Contributor

Description

Currently, for build, run, pack, test ... commands, we are stopping the compilation when there is no source code available in the project, with the following error. package is empty. Please add at least one .bal file.

However, we need to allow compilation of empty projects with code generator tools.

Describe your problem(s)

Code generator tools (build-tools) might be used to generate the entire source code of the project. In some cases, no additional source code is needed.
Eg :- Openapi build-tool can be used to generate an entire library from an openapi spec, with no user code (as raised by @TharmiganK )

Describe your solution(s)

Allow empty source code projects to proceed with the build if there are build-tools in the Ballerina.toml.

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@gayaldassanayake gayaldassanayake added Type/Improvement Area/CLI-BuildTools Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) labels Apr 18, 2024
@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Apr 18, 2024
@azinneera azinneera removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Apr 18, 2024
@gayaldassanayake gayaldassanayake self-assigned this Apr 18, 2024
@gayaldassanayake
Copy link
Contributor Author

Need to add a master PR as well before closing

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

Successfully merging a pull request may close this issue.

3 participants