[minor] Remove redundant info from plugin summary (#7339)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
pull/7352/head
Gabriel-Trintinalia 4 months ago committed by GitHub
parent 3925ee4a80
commit cee973d429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 18
      besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
  2. 2
      plugin-api/build.gradle
  3. 2
      plugin-api/src/main/java/org/hyperledger/besu/plugin/BesuPlugin.java

@ -379,22 +379,20 @@ public class BesuPluginContextImpl implements BesuContext, PluginVersionsProvide
plugin ->
summary.add(
String.format(
" - %s (Version: %s)",
plugin.getClass().getSimpleName(), plugin.getVersion())));
" - %s (%s)", plugin.getClass().getSimpleName(), plugin.getVersion())));
}
// Identify and log detected but not registered (skipped) plugins
List<String> skippedPlugins =
detectedPlugins.stream()
.filter(plugin -> !registeredPlugins.contains(plugin))
.map(plugin -> plugin.getClass().getSimpleName())
.toList();
List<BesuPlugin> skippedPlugins =
detectedPlugins.stream().filter(plugin -> !registeredPlugins.contains(plugin)).toList();
if (!skippedPlugins.isEmpty()) {
summary.add("Skipped Plugins:");
summary.add("Detected but not registered:");
skippedPlugins.forEach(
pluginName ->
summary.add(String.format(" - %s (Detected but not registered)", pluginName)));
plugin ->
summary.add(
String.format(
" - %s (%s)", plugin.getClass().getSimpleName(), plugin.getVersion())));
}
summary.add(
String.format(

@ -70,7 +70,7 @@ Calculated : ${currentHash}
tasks.register('checkAPIChanges', FileStateChecker) {
description = "Checks that the API for the Plugin-API project does not change without deliberate thought"
files = sourceSets.main.allJava.files
knownHash = 'vWxI4pduLCvzqU73k5kJsoeK9t7QTqOBC9IxksFuzBs='
knownHash = 'F07ix5Mkvycb2W2luprKmcMyrWcSLB4Xtou5Id10DW0='
}
check.dependsOn('checkAPIChanges')

@ -105,6 +105,6 @@ public interface BesuPlugin {
Optional.ofNullable(pluginPackage.getImplementationVersion())
.filter(version -> !version.isBlank())
.orElse("<Unknown Version>");
return implTitle + "/v" + implVersion;
return implTitle + "/" + implVersion;
}
}

Loading…
Cancel
Save