1

I am trying to understand the rationale behind this from a technical design perspective. why would creating namespace be limited in an org that's been marked as devhub? wouldn't the other way easier for developers to have the namespace and devhub in one org? enter image description here

1 Answer 1

2

It would be convenient, except that you can link one Namespace to multiple Dev Hub orgs, and you can link multiple Namespaces to a single Dev Hub org. A developer would be able to link the Dev Hub's Namespace to the Dev Hub's Namespace Registry. I'm pretty sure this would make the Namespace unusable in that org, because packages have to be registered to a Namespace, by name, if they're going to be a First Generation Package (1GP) or a Second Generation Package (2GP). Because the API uses the Namespace's name, and not its Id, this could cause problems when creating packages, especially when you start building dependencies. Overall, this restriction is to prevent weird packaging scenarios.

1
  • Thanks sfdcfox for replying. however, I am not quite following your thought process. I wonder if you can help further with these questions so I can follow your thoughts. 1. can a namespace be linked to multiple devhub and multiple devhub be linked to a namespace? if so, namespace and devhub are many to many relationship? If not, namespace and devhub are 1 to 1 relationship? 2. both 1GP and 2GP have to be registered to a namespace by name, correct? 3. surppose the namespace and devhub are in the same org, what would be an example of weird packaging senario? thank again.@sfdcfox
    – Don
    Sep 9, 2022 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .