opral / inlang-message-sdk

0 stars 0 forks source link

Reevaluate reactivity to lint reporting #63

Closed martin-lysk closed 1 month ago

martin-lysk commented 1 month ago

@martin.lysk1 said in MESDK-67:

As outlined here:
MESDK-92 I suggested to untangle the core from solid to understand how a thin reactivity layer(s) - we planned to implement (?) - will look like.

The PR linked in the description (https://github.com/opral/monorepo/pull/2378) removed reactivity from MessageLintReports because of performance issues. But the root cause of the performance bottleneck was fixed by (not confirmed!) (https://github.com/opral/monorepo/pull/2738) - the change described here was actually merged together with https://github.com/opral/monorepo/pull/2734.

If reactivity it self was not the bottleneck - I think we should revert https://github.com/opral/monorepo/pull/2378 in favour of reactive lint reports again.

Reasoning: If we look at the code on consumer side

https://github.com/opral/monorepo/pull/2378/files#diff-65892d1220824fd101194f7a4eb0f9c1aaeaf901900ce8281bcdc89686a32d0bR29

This sets up a resource that triggers if messages have changed inside of fink. I would argue that changes in messages (and changes in plugins, changes in lintrules lint rules and ….) have an effect on on lint reports should be wired up by the sdk's thin layer instead of the code in the linked diff on each consumer. Thats at least where the big benefit from reactivity comes from and how I understand the push towards reactivity from @samuel.stroschein.

I bring this up here because a thin layer for reactivity was the main driver for untangeling solid layer in the way i did with https://github.com/opral/monorepo/pull/2734, https://github.com/opral/monorepo/pull/2709 and why i proposed introducing a MessageStore next.

If this is what we wan't i am happy to support with the next steps and would have a clear path on what to do - if not I would focus on LIX again or would need more input on how i can support you @jldec with the SDK.

This ticket should reevaluate reactivity in lint reporting