Forum

Patch xml attributes rearranged

When I make some minor changes to a patch (like tweaking a single IOBox or something) and save the patch, vvvv sometimes rearranges the order of the attributes in the saved patch xml. It seems to often do this for nodes that haven’t actually changed at all (the attributes still have the same values, they’re just in a different order). When it does this, it tends to do it on a bunch of elements throughout the patch, not just ones that had actual changes. There’s an example below.

I haven’t yet been able to come up with a clear pattern of when it does this/doesn’t do it. I just know that it doesn’t always happen, but it does happen often.

In general this shouldn’t really matter, but it gets annoying when you’re using source control and it looks like you’ve modified a whole ton of patches when you’ve really only made actual changes to one or two.

@devvvvs: I’m assuming that the XML serialization is being done in the native Delphi core, since I haven’t found any related code in the managed assemblies. Is it using a standard library to do this, or is it custom-written? If it is custom written, it shouldn’t be particularly difficult to have it alphabetically sort the attributes or something like that. If it’s a third-party library, it may get more complicated…

Examples (note: I’ve highlighted some of the differences, but not all of them)
before saving (the previous version of the file):

<NODE nodename="IOBox (Color)" componentmode="InABox" id="111" systemname="IOBox (Color)">
   <BOUNDS type="Node" left="1005" top="10725" width="0" height="0">
   </BOUNDS>
   <BOUNDS type="Box" left="1005" top="10725" width="2250" height="480">
   </BOUNDS>
   <PIN pinname="Chooser Style" slicecount="1" values="RGBASlider">
   </PIN>
   </NODE>

after saving:

<NODE componentmode="InABox" id="111" nodename="IOBox (Color)" systemname="IOBox (Color)">
   <BOUNDS height="0" left="1005" top="10725" type="Node" width="0">
   </BOUNDS>
   <BOUNDS height="480" left="1005" top="10725" type="Box" width="2250">
   </BOUNDS>
   <PIN pinname="Chooser Style" slicecount="1" values="RGBASlider">
   </PIN>
   </NODE>

also, it’s been doing this pretty consistently throughout a bunch of different versions of vvvv

annoying indeed, thanks for the reminder. i found a little bugger, hope that was that. please check if you still notice this behavior with latest alpha.