I have this little helper library that specifies an optional dependency on
:jose. In the library code, some modules use
:jose functions, for example
JOSE.JWT.peek_payload/1. I’m not using any of those modules in my client application that uses the library.
During compilation of my client application, I get the following output when the library is compiled:
==> my_incredible_library Compiling 11 files (.ex) warning: function JOSE.JWK.from/1 is undefined (module JOSE.JWK is not available) lib/security/oauth2_plug.ex:115 warning: function JOSE.JWS.compact/1 is undefined (module JOSE.JWS is not available) lib/test_helpers.ex:90 etc etc
Is there a way to suppress those warnings in client applications from the library code? Or do I misunderstand optional dependencies and should
:jose be a non-optional dependency in this case?