I'm creating a 2 GP package packageB which depends on several 1 GP packages. In packageB, I'd like to extend a picklist from packageA, one of the managed packages, with additional values. I tried doing it by adding a file packageA__packageAField__c.field-meta.xml under the folder src/main/default/objects/packageA__packageAObject__c.fields in packageB's source directory, and adding the new picklist values there.
This worked in my development scratch org for packageB, as well as the test scratch org. However in the scratch org that Salesforce uses for releasing a package (and that we seem to have no visibility into), I got the following error:
"You're trying to include CustomField packageA__PackageAObject__c.packageA__packageAField__c in Package Release. This component already exists in Package null, which Package Release depends on. You can't include the same component in both packages."
How do I get this done please? Some of my test cases depend on the extended picklist values so I need them in the release org.
Not sure why packageA comes up as Package null either!