-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for xml files #18
Comments
Can you tell me a bit more about your use case? What kind of XML files do you use and which changes do you want SemanticDiff to hide? The issue with XML is that the spec only defines when a file is well formed. It doesn't really specify what changes you can make without changing the meaning. While most applications will just work fine if you reorder children inside of a parent or add additional whitespace for readability, this technically modifies the content. The only exception are attributes which you can reorder according to the spec. It is therefore difficult to implement a generic XML mode. |
XML support would be useful in the case of Twincat files. Twincat is a software for automation software by Beckhoff, and save configuration as well as code into xml files. It has the tendency to modify these xml files for no reasons which makes source control of your project painful. Here are a few examples of what can happen and result in diff in regular text based diff:
|
I find that XML files is something most diff tools do poorly. I often encounter issues when merging lists that contain the same element multiple times:
When there is a merge conflict with a For me the place I most often encounter this is in C# project files, and Visual Studio solution files. |
I often change the white spacing in XML files - whether tabs or newlines. If SemanticDiff supports XML files, it would greatly help me ignore whitespace changes. |
We just released SemanticDiff 0.10.0 which adds support for XML. Please give it a try and report back if it works for you. |
I tried on a few XML files from a Twincat project and it's doing a decent job a finding random move of XML elements, even on big files 1.8MB). However sometimes it doesn't match the moved regions as well as VSCode diff. Below is an example:
VSCode find the minimum move region PS: The online tool find both moved regions so it might be that this has already been improved. |
@ebw44 Thanks for pointing this out. We have debugged the issue and it turns out to be a difference between the Windows and Linux versions of SemanticDiff. One of the libraries we use behaves slightly different depending on the operating system (stable vs. unstable sorting). The diff is valid in both cases (no changes get lost), but one might be slightly easier to understand than the other. We will fix this in the next release. |
It would be nice if you could implement xml support in order to compare version ?
Actually, we get "Unsupported language: xml" message
The text was updated successfully, but these errors were encountered: