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

Let a user know, in case no traces were found using quarkus --trace command #309

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions domino/app/src/main/java/io/quarkus/domino/cli/Quarkus.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ public void handleResolutionFailures(Collection<Artifact> artifacts) {

treeProcessor.process();

int membersWithTraces = 0;
for (var report : memberReports) {
if (report.enabled && report.hasTraces()) {
++membersWithTraces;
log.info("");
log.info("== " + report.metadata.getBom().getGroupId().toUpperCase()
+ ":" + report.metadata.getBom().getArtifactId().toUpperCase()
Expand Down Expand Up @@ -303,6 +305,22 @@ public void handleResolutionFailures(Collection<Artifact> artifacts) {
}
}
log.info("");

if (trace != null && !trace.isEmpty() && membersWithTraces == 0) {
var sb = new StringBuilder()
.append("No traces of ");
var i = trace.iterator();
sb.append(i.next());
if (i.hasNext()) {
var next = i.next();
while (i.hasNext()) {
sb.append(", ").append(next);
next = i.next();
}
sb.append(" and ").append(next);
}
log.info(sb.append(" found").toString());
}
return 0;
}

Expand Down