Salesforce DX does not track some of the changes I make on my scratch org.
How to reproduce a problem:
- Create a custom profile ->
- Create a custom object ->
- Delete a custom object ->
sfdx force:source:statusshows no problems
Then an interesing thing might be observed - opening a new scratch org and pushing a source there causes the following error:
PROJECT PATH ERROR
force-app\main\default\profiles\My Custom Profile.profile-meta.xml In field: field - no CustomObject named Custom_Object__c found
The problem is that in the "My Custom Profile.profile-meta.xml" file there's still a
<layoutAssignments> section which I have to delete manually:
<layoutAssignments> <layout>Custom_Object__c-Custom Object Layout</layout> </layoutAssignments>
My question is: Can I make SFDX to track these changes somehow?
PS Another thing is that it looks like a bug a bit but I'm just not sure.
Update: I've reported this case and Salesforce support indentified it as a bug: Deleting a custom field/object should remove references with force:source:pull Help to resolve this problem by clicking "This Issue Affects Me".