You may have noticed some unexpected XML changes within your git repositories. As of the 6 March 2020, Gearset has changed the ordering it uses to reflect what you’d expect when using another tool such as Ant, Workbench, or SFDX CLI.

Why are we doing this?

To be more consistent with Salesforce, we have made some changes to how core components within an XML file are ordered. A core component, which is a Gearset concept, is an XML component of a metadata item which cannot be deleted separately to the parent item via destructiveChanges.xml. An example of a core component would be CompactLayoutAssignment within a Custom Object.

Previously, Gearset would select the position for these core components within the XML based on a hardcoded relative position unique to Gearset. This behavior was different to Ant or SFDX, which would give you an alphabetical list of components. Gearset now respects this ordering, and presents components in the same order: alphabetically.

This change will ensure consistency between metadata in git which is deployed by Gearset, Ant or SFDX.

How will this affect your deployments?

Most of these changes will be unnoticeable to everyone and not result in any perceptible behaviour changes as Gearset will respect the existing ordering of your XML in git. However, next time you deploy to files which aren’t in the same order as Ant or SFDX would provide, some XML will move within the file. This will happen once per affected file, after which the ordering will remain stable.

Did this answer your question?