Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public CompileTask(PrintStream out,
}
@Override
public void execute(Project project) {
if (ProjectUtils.isProjectEmpty(project) && skipCompilationForBalPack(project)) {
if (ProjectUtils.isProjectEmpty(project) && skipCompilationForBalPack(project) &&
project.currentPackage().balToolToml().isEmpty()) {
throw createLauncherException("package is empty. Please add at least one .bal file.");
}
if (project.workspaceProject().isPresent()) {
Expand All @@ -110,7 +111,7 @@ public void execute(Project project) {
project.currentPackage().packageVersion();
}
// Print the source
this.out.println("\t" + sourceName);
this.out.println(" " + sourceName);
if (skipTask) {
return;
}
Expand Down Expand Up @@ -230,7 +231,8 @@ public void execute(Project project) {

Optional<Diagnostic> projectLoadingDiagnostic = ProjectUtils.getProjectLoadingDiagnostic().stream().filter(
diagnostic -> diagnostic.diagnosticInfo().code().equals(
ProjectDiagnosticErrorCode.DEPRECATED_RESOURCES_STRUCTURE.diagnosticId())).findAny();
ProjectDiagnosticErrorCode.DEPRECATED_RESOURCES_STRUCTURE.diagnosticId())).
findAny();

projectLoadingDiagnostic.ifPresent(out::println);
PackageCompilation packageCompilation = project.currentPackage().getCompilation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public CreateDependencyGraphTask(PrintStream err, PrintStream out) {

@Override
public void execute(Project project) {
if (ProjectUtils.isProjectEmpty(project)) {
if (ProjectUtils.isProjectEmpty(project) && project.currentPackage().balToolToml().isEmpty()) {
throw createLauncherException("package is empty. Please add at least one .bal file.");
}
System.setProperty(CentralClientConstants.ENABLE_OUTPUT_STREAM, "true");
Expand Down