I'm working on a project that is extended by another package. The base package contains a global interface that will be implemented in the extension package. I'm having some problems with the development of the interface. My problem is that after I've uploaded a managed release of the base package the global interface can no longer be changed. It would be possible to upload a managed beta, but that I won't be able to update that in the extension environment without uninstalling it.
I need to able to upload a managed release of the base package and still be able to alter the global interface (because during the development of the extension class, the requirements for the interface change). Is that possible?
Suggested solution
What if I created 2 interfaces in the base class like this:
public virtual interface BaseInterface {
//all the function definitions that need to be in the global interface
}
and
global interface GlobalBaseInterface extends BaseInterface {
//no actual content
}
If I were to package these two interfaces and upload a managed release; would I still be able to alter the contents of the public virtual interface BaseInterface
? And will the function definitions within that interface be visible in the extension package?
UPDATE
I actually tried the solution above and, as Stephen Willcock said, the functions are not visible. Although this works if you make sure you implement all the functions, the problem is that you will not get a compile time error if you don't implement one of the functions. If that function is used in the code you will get a run-time error. So it could be useful to do it like this; it could be very dangerous as well.