When developing a managed (namespaced) package in a scratch org we'd also like to install another package to help fully test it's behaviour.

This other package actually requires the one in development and at present it's installation is failing since it thinks its dependency (the package in dev in the scratch org) isn't installed.

I get this issue when installing through CLI and GUI.

enter image description here

  • So your scratch org is populated with unpackaged metadata? Can you perform your testing in a scratch org with a managed beta installed, and does that help? – David Reed Jun 5 '19 at 12:14
  • Ah yes we could (and do) do this testing in a scratch org with a packaged version, but that takes extra time and it would be nice to be able to have full visibility and modify code as we're still essentially in development stage (of additional features) – Todd Halfpenny Jun 5 '19 at 12:32

It sounds like you can't install Package B in Package A org because Package B depends on release 1.164 of Package A. That being the case, I'm guessing in the packaging org of Package B, you had v1.164 Package A installed when you created a release of Package B?

If that is the case, I'm not sure you're going to get out of that without releasing the dependency on Package A, in Package B.

Dependencies are likely caused as a result of referencing code or objects from Package A, in Package B. You could potentially release those dependencies by using dynamic SOQL/DML and potentially utilising the Callable interface if you're calling APIs.

Could you save yourself the time and install both into another Test org?

  • Yes this is our assumption... though I'm hoping there's a way around this as when developing a package in a namespaced scratch org I would have hoped that all dependencies were actually in place. We'd like to not have to do this post-packaging of Package A, as we're in essence still in dev mode, and doing this would mean extra time and process. – Todd Halfpenny Jun 5 '19 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.