[IGN-4488] Changes to UDTs Results in Very Different UDT Exports

udts_v1.json (17.4 KB)
udts_v2.json (17.9 KB)

Hey all,

I am trying to track the changes to my UDTs through source control. However, I'm having a hard time trying to understand the distinct changes from one export to another, because whenever I import a UDT file, make changes, then export a UDT file with those changes, the ordering of the contents seems to change every time.

I've attached two files as an example: _v1 is my original UDT file which I imported, and _v2 is my new UDT export after making the changes that I needed to make (I basically just added a brand new UDT, and added a new tag to another existing UDT). If I run these two files though a diff checker, I get something like this as an output:

This basically makes it impossible to properly track changes to UDTs through source control, and makes it very difficult to know specifically what changed from one file to another, unless you take the time to manually go through each file line by line to verify what the changes are.

Is there a way to make it so then the exports are generally sorted the same each time? Or if not, does anyone know if there are plans to improve this in the future?

Thank you in advance!

IA doesn't use ordered maps in java, so you get scrambled key order.

This isn't the only part of Ignition that is unfriendly to source control. ):

I added this thread to the existing internal ticket to force a deterministic ordering to tag exports before they're written out to disk.

I also bumped that ticket a bit in priority.


Awesome, thanks for getting back to me guys.

I guess more just in general, does anyone have any tips on better maintaining/tracking tag or UDT changes through source control with the current version of Ignition?

You can use a tool that looks at the semantic JSON diff, rather than a naive line-by-line diff, e.g.:

I don't think there are significantly better options right now.