Watcher introduces plugin logic into sdk. #1595
Replies: 2 comments
-
Message FilesAs discussed this morning, I'm strongly voting for Proposal 1, watcher in plugin with plugin settings. Settings FilePlease don't forget that we can also do a watcher in the SDK itself for the |
Beta Was this translation helpful? Give feedback.
-
Hey guys, to clarify again: Plugins should not receive watch APIs! We can't rely on plugin developers to ensure that watching a) is implemented and b) works Pseudocode
SDK consumers will now have an automatic watching mechanism in place because Pitfalls Be aware that |
Beta Was this translation helpful? Give feedback.
-
Problem
See the problem in my loom ->
https://www.loom.com/share/cb76b40fa5b846399b8fa5fb7ccc65df?sid=97098f50-5747-4a0f-9c46-a5ebe5194cb9
Proposal 1: Plugin specific stuff should be in plugins
We could add a watcher function with callback to the plugins. The SDK would only access the callback and based on that it would update messages.
SDK:
Plugins:
Pro:
Cons:
Proposal 2: Let the plugins tell us where to watch
If the plugins expose something like a watchPath. We can use that universal information to put the watcher in the SDK.
SDK:
Plugins:
Pro:
Cons:
Proposal 3: No support for legacy plugins
We check if a filePath is there. Old plugins are not getting watcher support.
Pro:
Cons
@inlang/sdk @inlang/lix @inlang/plugins
Beta Was this translation helpful? Give feedback.
All reactions