The issue was that the isNecessary logic is too eager in case there are conflicting formattings. To explain in short: Sometimes, this filtered the expected formatting and only left over the "unexpected" formatting. When reformatting, the expected and unexpected formatting "switched places" and this led to cyclic behavior.
Note that this issue wasn't reproducible on Windows, due to erroneous comparisons between \n and \r\n.
Closes https://github.com/eclipse-langium/langium/issues/1362
The issue was that the
isNecessary
logic is too eager in case there are conflicting formattings. To explain in short: Sometimes, this filtered the expected formatting and only left over the "unexpected" formatting. When reformatting, the expected and unexpected formatting "switched places" and this led to cyclic behavior.Note that this issue wasn't reproducible on Windows, due to erroneous comparisons between
\n
and\r\n
.