We have a repo for a managed package, that we build through a dev hub/scratch org.
2 of the 3 developers, everything works as documented with the sfdx tutorials. 1 of the developers environment has an anomaly that we can not detect. Whenever we do sfdx force:source:push -u scratch-org-user we get errors, that are triggered because the dependent objects are not being passed to the scratch org appropriately. Further digging we found that the meta data being passed with the push seems to be incorrect. Even when we pull down the meta data from the partner org, and convert into the scratch org fresh, and push, it still creates the same issue, for example:
When you do a mdapi:retrieve, then a mdapi:convert, the package.xml all look correct, but when force:source:push is called, everything in the package becomes a "CustomSite", I've attached the converted output...
=== Converted Source
STATE FULL NAME TYPE PROJECT PATH
- Add ModelStatus CustomSite ..classes/ModelStatus.cls-meta.xml
- Add ModelStatus CustomSite ..classes/ModelStatus.cls
- Add wut CustomSite ..contentassets/wut.asset-meta.xml
- Add wut CustomSite ..contentassets/wut.asset
- Add Account_Page CustomSite .flexipages/Account_Page.flexipage-meta.xml
- Add Model_Page CustomSite ..flexipages/Model_Page.flexipage-meta.xml
- Add Opportunity_Page CustomSite ..flexipages/Opportunity_Page.flexipage-meta.xml
From a package.xml that looks similar to this (modified for privacy,security,etc):
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>deploy</fullName>
<types>
<members>ModelStatus</members>
<name>ApexClass</name>
</types>
<types>
<members>Model_Status</members>
<name>AuraDefinitionBundle</name>
</types>
<types>
<members>wut</members>
<name>ContentAsset</name>
</types>
<types>
<members>Account.Account_Tier__c</members>
<members>Account.Active__c</members>
<members>Model__c.End_Date__c</members>
<members>Model__c.Model_Type__c</members>
<members>Model__c.Start_Date__c</members>
<members>Model__c.Status__c</members>
<members>settings__c.name__c</members>
<members>settings__c.value__c</members>
<name>CustomField</name>
</types>
<version>43.0</version>
</Package>
The errors we get are errors you would see if a referenced class or asset wasn't present and could not be located.
The ironic thing, is using the exact same steps on a different users machine, from repo pull, to sfdx force:source:push, and the outcomes are totally different. 1 works, and 1 fails.
Thoughts?