Skip to content

Commit

Permalink
Merge pull request #1113 from quarkiverse/#1108
Browse files Browse the repository at this point in the history
Properly warn about missing javac -parameters flag
  • Loading branch information
geoand authored Nov 26, 2024
2 parents 6b6ed17 + 123a182 commit 8a29c07
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1362,16 +1362,16 @@ private List<TemplateParameterInfo> gatherTemplateParamInfo(List<MethodParameter
}
}

if ((templateParams.size() == 1) && (params.size() == 1)) {
// the special 'it' param is supported when the method only has one parameter
templateParams.add(new TemplateParameterInfo(0, "it"));
}

if (!templateParams.isEmpty() && templateParams.stream().map(TemplateParameterInfo::name).allMatch(Objects::isNull)) {
log.warn(
"The application has been compiled without the '-parameters' being set flag on javac. Make sure your build tool is configured to pass this flag to javac, otherwise Quarkus LangChain4j is unlikely to work properly without it.");
}

if ((templateParams.size() == 1) && (params.size() == 1)) {
// the special 'it' param is supported when the method only has one parameter
templateParams.add(new TemplateParameterInfo(0, "it"));
}

return templateParams;
}

Expand Down

0 comments on commit 8a29c07

Please sign in to comment.