Closed samuelstroschein closed 1 month ago
@samuel.stroschein Just to be sure - Can you describe the difference between apps and plugins?
Plugins
Plugin detect changes and conflicts in file formats.
Apps
Provide a UI and functionality on top lix change control.
Difference
Plugins instruct lix on how to deal with file formats.
Good enough? We should add the definitions to the docs then
Ok - in my own words:
A plugin is provided with the before and after states of a file and extracts all information that represents a snapshot of the entities within that file.
In case of a *.md file that could be the whole file (because we have no identifier but the file name).
In case of inlang the plugin compares two states of a sqlite file, extracts changed rows (each having a ID) and stores them as a snapshot.
-> Makes sense
What i don't understand is the role app's play here -
A Plugin does NOT(?) enrich the change information with metadata. What, why and when would apps store metadata than?
Good explanation although the explanation is specific to plugin.detectChanges
. The generic description for a plugin would go along the lines of "A plugin provides lix with change information for a file format".
What i don't understand is the role app's play here -
​A Plugin does NOT(?) enrich the change information with metadata. What, why and when would apps store metadata than?
Easier to explain on a call.
TL;DR apps can enrich changes that have been reported by plugins however they need.
For example, the CSV app can implement change tags via change.metadata
without support from the lix SDK as a workaround/test case.
It follows that plugins don't need metadata. They can report everything they know via the snapshot. Apps can't report and edit a snapshot though. Hence, they need the metadata field to add information to changes that a plugin didn't provide in the snapshot.
Cancelled.
Context
@samuel.stroschein said in LIXDK-169:
Proposal
cc @martin.lysk1 agree?