If I have a Managed Package with Namespace ns2
, with package components that depend on / extend components in ns1
, then ns1
must first be installed in an org before ns2
can be installed – as ns2
has become an “extension” package of the ns1
“base” package.
So my question is: if I remove the components in ns2
that depend on ns1
, and then push out a new version of ns2
, will the new version of ns2
still require ns1
to be installed? I believe that the answer is YES, but I have not actually tried it before. Has anyone ever tried this?
Example scenario:
ns1
has aglobal virtual
Apex Class calledBaseController
ns2
has apublic
class calledNS2ControllerImpl
which extendsns1.BaseController
- Since the
ns2
class is public, I can change the class signature so that it no longer extendsns1.BaseController
- Assuming that this is the only remaining reference in
ns2
tons1
, if I push out a new version ofns2
, will I be able to installns2
into an org without havingns1
installed in that org?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I have tried this before and can confirm I have seen it remove the dependency from the Dependencies page available from the Package details page. You might need to make sure the metadata files associated with your Apex, VF pages and components are updated. But this should work. Be careful though as you cannot put back those components or reuse their names. I have seen issues with shadow copies of them holding a package dependency in the past, but lately this seems to have been resolved.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0