Skip to content

Commit

Permalink
chore: reconcile focus on installed plugin types
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Aug 29, 2023
1 parent c5706c5 commit 81d6c6d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ private boolean reconcile(PluginCatalog catalog) {
.orElseThrow(() -> new IllegalArgumentException("Unknwon plugin catalog location."));
List<PluginType> installedTypes = catalog.getPlugins().entrySet().stream().map(Map.Entry::getValue).map(Plugin::getType)
.collect(Collectors.toList());
Map<String, Plugin> installablePlugins = state.getInstallablePlugins().entrySet().stream()
//Let's only fetch installable plugins of the corresponding types.
//This will help us avoid uneeded calls to things like jbang if no jbang plugins are installed
Map<String, Plugin> installablePlugins = state.installablePlugins(installedTypes).entrySet().stream()
.filter(e -> installedTypes.contains(e.getValue().getType()))
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));

Expand Down

0 comments on commit 81d6c6d

Please sign in to comment.