opral / inlang-sdk

0 stars 0 forks source link

raise conflicts for variants with the same matcher #150

Open samuelstroschein opened 2 months ago

samuelstroschein commented 2 months ago

Context

This below should have been a conflict. I merged "viva la application" which has a different variant.id but the matcher is identical to meine coole app.

CleanShot 2024-08-28 at 17.01.11@2x.png

Reproduction

  1. Open tis file in fink

    minimal-meine-coole-app.inlang

  2. Merge this file into the first one

minimal-viva-la-application.inlang

NilsJacobsen commented 2 months ago

That feels like a validation rule topic? We allow adding two variants with the same matchers.

samuelstroschein commented 2 months ago

Good point. It could be solved with both. Solving it via a validation rule seems more generic

NilsJacobsen commented 2 months ago

How do we detect that as a conflict? Can we use validation rules to raise conflicts when merging? -> So only healthy states get through?

samuelstroschein commented 2 months ago

we can use validation rules but they are semantically different than conflicts. a conflict = unmergable. validation rule = mergable but you likely don't want that.

showing both while merging is prob what we should do