We have 2 managed packages. Let's name those MPMAIN and MPCHILD. MPCHILD package is dependent on MPMAIN.
In MPCHILD we have a class:
@deprecated
global class ChildClass extends MPMAIN.MainClass {
...
}
MainClass in MPMAIN v.1 had a body without an explicitly specified constructor:
global abstract with sharing class MainClass {
...
// No constructor here.
...
}
Later we released a new version of MPMAIN v.2 with changed MainClass:
global abstract with sharing class MainClass {
...
global MainClass() {
...
}
...
}
When we installed the new version MPMAIN v.2 into MPCHILD instance we started to get an error message when we compile all classes:
ChildClass: line 2, column 14: Method is not visible: void MPMAIN.MainClass.()
ChildClass is still pointed to v.1 of MPMAIN package. And we can't change it as the ChildClass is deprecated. If I try to change MPMAIN package version I get the error:
Compile Error: A class with name MPCHILD.ChildClass was deprecated for this package or this name is already in use! at line -1 column -1
We reverted the MPCHILD package from Release to Beta but still can't remove @deprecated for ChildClass.
Compile Error: Previously annotated identifier with @Deprecated must still be annotated: MPCHILD.ChildClass at line 1 column 14
I guess we see this error message because the ChildClass is global. But how can we resolve the issue?