I @deprecated some interfaces and methods in a minor release (v1.1) of my managed package. Now I'm working on a patch to that minor release (v1.1.1), using a freshly created patch org, and am getting some peculiar behavior:
- I edit and save a class with a @deprecated method and get an error:
"Save error: Deprecation is not allowed in a patch organization"
(referring to the deprecated method). But the method in question was already deprecated in v1.1 prior to the creation of the patch org.
- When I look at the package contents in the patch org I get an error "A patch version cannot contain any new components. The list below indicates which components you must remove before proceeding with the upload." The items listed are the deprecated interfaces. I could not find an option to delete them - and anyway it shouldn't be mandatory to do so since these items are not new.
Seems that something is weirdly corrupted - any pointers on how to resolve would be much appreciated.
UPDATE: Update: removing all the @deprecated tags in the patch org allows me to save and upload a beta version of the package. But uploading a managed version (same code) I get: An unexpected error occurred when uploading your package. Please contact Salesforce Support and provide the following error code: 1442969544-12204 (-1826486931). Ultimately I ended up creating a version 1.2 which seems to handle the deprecation OK so far