use of org.graalvm.component.installer.DependencyException in project graal by oracle.
the class InfoCommand method printDetails.
@Override
void printDetails(ComponentParam param, ComponentInfo info) {
if (printTable) {
String line;
if (fullPath) {
line = String.format(feedback.l10n("INFO_ComponentLongList"), shortenComponentId(info), val(info.getVersion().displayString()), val(info.getName()), filePath(info), info.getStability().displayName(feedback));
} else {
line = String.format(feedback.l10n(noComponentPath ? "INFO_ComponentShortListNoFile" : "INFO_ComponentShortList"), shortenComponentId(info), val(info.getVersion().displayString()), val(info.getName()), filePath(info), info.getStability().displayName(feedback));
}
feedback.verbatimOut(line, false);
return;
} else {
feedback.output("INFO_ComponentBasicInfo", shortenComponentId(info), val(info.getVersion().displayString()), val(info.getName()), param.getFullPath(), findRequiredGraalVMVersion(info), info.getStability().displayName(feedback));
List<String> keys = new ArrayList<>(info.getRequiredGraalValues().keySet());
keys.remove(CommonConstants.CAP_GRAALVM_VERSION);
if (!keys.isEmpty() && feedback.verboseOutput("INFO_ComponentRequirementsHeader")) {
Collections.sort(keys);
for (String cap : keys) {
feedback.verboseOutput("INFO_ComponentRequirement", getRegistry().localizeCapabilityName(cap), info.getRequiredGraalValues().get(cap));
}
}
MetadataLoader ldr = map.get(info);
List<InstallerStopException> errs = ldr.getErrors();
if (!errs.isEmpty()) {
feedback.message("INFO_ComponentBroken", files.get(info));
for (InstallerStopException ex : errs) {
feedback.message("INFO_ComponentErrorIndent", ex.getLocalizedMessage());
}
}
Verifier vfy = new Verifier(feedback, input.getLocalRegistry(), catalog).collect(true).validateRequirements(info);
if (vfy.hasErrors()) {
feedback.message("INFO_ComponentWillNotInstall", shortenComponentId(info));
for (DependencyException ex : vfy.getErrors()) {
feedback.message("INFO_ComponentDependencyIndent", ex.getLocalizedMessage());
}
}
}
}
Aggregations