The longer I read and watch everything related to Org modularization using Salesforce DX Unlocked packages there more I get the feeling that this is only about local dependencies meaning:
- You take the code of ONE org
- Convert it to ONE dx project
- Version it in ONE repository
- Define the dependencies in ONE project.json
What if I want to
- Take the code of MULTIPLE orgs (and consolidate it)
- Convert it into MULTIPLE DX projects
- Version those in MULTIPLE independent repos (with different) teams
- Define the dependencies wherever they occur
Would this work? Would they all need to "live under" the same Dev Hub? Is this the reason why this cannot be used for ISVs as it doesn't scale? Will this all be solved with 2GP (second generation packaging)?
If so what are the consequences when modularizing a happy soup org?
- Should I create one super repository per org where each package is just a folder?
- How do I allow independent teams to work on a single package?
- Where do I define the different scratch orgs needed per package?