[Improvement]: Allow the package build for empty projects when there are code generator tools #42583
Labels
Area/CLI-BuildTools
Team/DevTools
Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )
Type/Improvement
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
The text was updated successfully, but these errors were encountered: