When deploying the LWC, the deployment fails:
- the Apex action method CLASS_NAME.METHOD_NAME with public access modifier must be in the same package with caller 'markup://XYZ:newLWC'
This does make sense as the methods we are referencing are not annotated as @NamespaceAccessible. However, it creates extra work for our developers who have to manually update Apex classes marking every dependency of the imported method(s) as global in their scratch orgs before they can start their development work.
Is there a best practice approach for development that covers this use case? We have the option to annotate these methods as namespace accessible, which is definitely preferable to declaring classes and methods as global, but it isn't a true requirement for our use case. I've seen that tools like CumulusCI offer functionality for namespace injection during deployments and would be open to exploring the use of this type of tool if it can solve this problem.