Context
Upstream PR plugwerk/plugwerk#506 (closes plugwerk/plugwerk#504) is a breaking SPI change shipping in 1.0.0-beta.4:
PlugwerkUpdateChecker.checkForUpdates now takes List<InstalledPluginRef> instead of Map<String, String>. The wire-API is unchanged — only the SPI input shape changes.
Affected files in this repo
gh search code found two call sites:
plugwerk-java-cli-example/plugwerk-java-cli-example-app/src/main/java/io/plugwerk/example/cli/command/UpdateCommand.java
plugwerk-springboot-thymeleaf-example/src/main/java/io/plugwerk/example/webapp/controller/PluginInstalledController.java
Both call marketplace.updateChecker().checkForUpdates(installed) where installed is a Map<String, String>. After the bump the parameter must be a List<InstalledPluginRef>.
Migration
// before
Map<String, String> installed = pluginManager.getPlugins().stream()
.collect(Collectors.toMap(p -> p.getPluginId(), p -> p.getDescriptor().getVersion()));
List<UpdateInfo> updates = marketplace.updateChecker().checkForUpdates(installed);
// after
import io.plugwerk.spi.model.InstalledPluginRef;
List<InstalledPluginRef> installed = pluginManager.getPlugins().stream()
.map(p -> new InstalledPluginRef(p.getPluginId(), p.getDescriptor().getVersion()))
.toList();
List<UpdateInfo> updates = marketplace.updateChecker().checkForUpdates(installed);
Tasks
Why a separate issue
The breaking change must land in the main repo first (PR #506). Once 1.0.0-beta.4 is published, this repo can pick up the new artifact and migrate. Doing it in lockstep avoids a window where examples don't compile.
Source
Upstream: plugwerk/plugwerk#504 (issue), plugwerk/plugwerk#506 (PR).
Context
Upstream PR plugwerk/plugwerk#506 (closes plugwerk/plugwerk#504) is a breaking SPI change shipping in
1.0.0-beta.4:PlugwerkUpdateChecker.checkForUpdatesnow takesList<InstalledPluginRef>instead ofMap<String, String>. The wire-API is unchanged — only the SPI input shape changes.Affected files in this repo
gh search codefound two call sites:plugwerk-java-cli-example/plugwerk-java-cli-example-app/src/main/java/io/plugwerk/example/cli/command/UpdateCommand.javaplugwerk-springboot-thymeleaf-example/src/main/java/io/plugwerk/example/webapp/controller/PluginInstalledController.javaBoth call
marketplace.updateChecker().checkForUpdates(installed)whereinstalledis aMap<String, String>. After the bump the parameter must be aList<InstalledPluginRef>.Migration
Tasks
1.0.0-beta.4(in whichevergradle/libs.versions.toml/pom.xml/ equivalent the examples use)UpdateCommand.java(CLI example)PluginInstalledController.java(Spring Boot Thymeleaf example)Map<String, String>shape (grep -RIn 'checkForUpdates' .)Why a separate issue
The breaking change must land in the main repo first (PR #506). Once
1.0.0-beta.4is published, this repo can pick up the new artifact and migrate. Doing it in lockstep avoids a window where examples don't compile.Source
Upstream: plugwerk/plugwerk#504 (issue), plugwerk/plugwerk#506 (PR).