Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise conflicts for variants with the same matcher #150

Open
samuelstroschein opened this issue Aug 28, 2024 — with Linear · 4 comments
Open

raise conflicts for variants with the same matcher #150

samuelstroschein opened this issue Aug 28, 2024 — with Linear · 4 comments

Comments

Copy link
Member

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

@samuelstroschein samuelstroschein self-assigned this Aug 29, 2024
Copy link
Member

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

Copy link
Member Author

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

  • if i work in a project and add a variant with the same matcher -> validation rule?
  • if i merge your work -> conflict?

Copy link
Member

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

Copy link
Member Author

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

@samuelstroschein samuelstroschein removed their assignment Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants