Detecting merge conflicts left in files like Swift compiler

80 views
Skip to first unread message

Luke Imhoff

unread,
Oct 26, 2016, 11:55:37 PM10/26/16
to elixir-lang-core
The Swift Compiler has special code to detect when you left a merge conflict in your source files (https://twitter.com/jordanpittman/status/782026590146465794/photo/1), so it doesn't silently get treated as valid code or give a really cryptic error.  Is this something worth adding to the Elixir lexer or grammar?

Michał Muskała

unread,
Oct 27, 2016, 1:38:01 AM10/27/16
to elixir-l...@googlegroups.com
I like this idea. I think it's common enough, and the change wouldn't be that big, that this is worth it.

Michał.

> On 27 Oct 2016, at 05:55, Luke Imhoff <kroni...@gmail.com> wrote:
>
> The Swift Compiler has special code to detect when you left a merge conflict in your source files (https://twitter.com/jordanpittman/status/782026590146465794/photo/1), so it doesn't silently get treated as valid code or give a really cryptic error. Is this something worth adding to the Elixir lexer or grammar?
>
> --
> You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/d27d1c66-d3be-4f7f-8444-d37df4e4f2c6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Onorio Catenacci

unread,
Oct 31, 2016, 8:01:58 AM10/31/16
to elixir-lang-core
Do all of the various merge tools have the same way of denoting unmerged code?  I can only remember git off the top of my head and it's something like:

>>>>>>>>>>>

Would we need to have a set of unmerged markers that we want to check for?  Just curious.

oc

Michał Muskała

unread,
Nov 4, 2016, 3:18:57 PM11/4/16
to elixir-l...@googlegroups.com
I took the liberty of opening a PR for this: https://github.com/elixir-lang/elixir/pull/5416

Michał.
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/9b659301-6c3f-4ac3-96a2-59d72b603bc4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages