You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PR_NOTES.md
+14-61Lines changed: 14 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,9 @@ The plugin system provides a higher-level abstraction over the existing intercep
16
16
17
17
**Decision:**`ClientPlugin` and `WorkerPlugin` each define their own `getName()` method independently, rather than sharing a base `Plugin` interface.
18
18
19
-
**Rationale:** This matches the Python SDK's design. Python has separate `ClientPlugin` and `WorkerPlugin` with `name()` on each. We initially had a base `Plugin` interface but removed it to simplify.
19
+
**Rationale:** This matches the Python SDK's design. Python has separate `ClientPlugin` and `WorkerPlugin` with `name()` on each. I initially had a base `Plugin` interface but removed it to simplify.
20
+
21
+
**Alternative considered:** I could add a shared `Plugin` interface with just `getName()`. This would allow `List<Plugin>` instead of `List<?>` for storage. However, this adds an interface that serves no purpose other than type convenience, and Python doesn't have it.
**Decision:**Include a `PluginDiscovery` class that uses Java's `ServiceLoader` for auto-discovery.
60
+
**Decision:**I do not include ServiceLoader-based plugin discovery.
72
61
73
-
**Status:** This is optional and currently **untested**. May be removed before merging.
74
-
75
-
**Rationale for including:** ServiceLoader is a standard Java pattern used by JDBC, logging frameworks, etc.
76
-
77
-
**Rationale for removing:**
62
+
**Rationale:**
78
63
- Python doesn't have this - just uses explicit `plugins=[]`
79
-
-Adds complexity with questionable value
64
+
-ServiceLoader requires classes with no-arg constructors, which doesn't integrate with `SimplePluginBuilder`
80
65
- "Magic" discovery is harder to debug than explicit configuration
81
-
-No test coverage
66
+
-Explicit plugin configuration is clearer and sufficient
82
67
83
-
### 6. Plugin Storage Type
68
+
We could consider adding it in though if there is interest.
84
69
85
-
**Decision:**`WorkflowClientOptions.getPlugins()` returns `List<?>` rather than a typed list.
86
-
87
-
**Rationale:** Without a common base interface, we need to store plugins that could be `ClientPlugin`, `WorkerPlugin`, or both. Using `List<?>` (or `List<Object>` internally) allows this flexibility. Users cast to the appropriate interface when needed.
0 commit comments