Stable component IDs

What do you want to achieve?

I’d like to be able to cherry-pick changes from my UI engineer in git. One challenge I face is that simple changes in SquareLine often produce very large differences in the project file. For example, moving a screen slightly in SLS produces ~24k line patchfile, mostly consisting of things like this, which only change the “compnid”:

                           {
                             "nid": -27485376,
-                            "compnid": 264909706,
+                            "compnid": 553014001,^M
                             "strtype": "_style/StyleState",
                             "strval": "PRESSED",
                             "InheritedType": 1
                           },

Do you see alternative options and workaround to achieve it?

I considered writing a python parser/serializer that might be able to address this, but I figured I would ask here. It’s also complicated since after the cherry-pick or merge, SLS needs to export the code again.

Mention some use cases

This could be helpful for anyone using SLS with git and branches.

Thanks for the constructive tip Richard. We’ll consider implementing this feature.

I have run into this as well when using version 1.4.1 on Windows. Simply opening the project and only clicking File > Save then closing the project, with no changes whatsoever, results in every compnid changing. This makes collaborating with multiple developers extremely difficult when changing one thing or not changing anything results in a 25k merge conflict.

Any update on this?

It is absolutely on our to do list, hope to have it done in the next few weeks.

1 Like

Is this coming soon? We have a large project that is currently bottlenecked by this.

Looks like this was fixed in 1.5.0 ("Fixed widget ID changes during project export.
"), and it helps so much. Thanks Sofi and Hermit!

1 Like

thank you for your kind comment Richard:)

1 Like