voltone / x509

Elixir package for working with X.509 certificates, Certificate Signing Requests (CSRs), Certificate Revocation Lists (CRLs) and RSA/ECC key pairs
BSD 3-Clause "New" or "Revised" License
120 stars 28 forks source link

warning(Logger): Switch to Logger.warning since Logger.warn is deprec… #66

Closed tomciopp closed 1 year ago

tomciopp commented 1 year ago

…ated.

So Logger.warn has been deprecated in favor of Logger.warning. This PR replaces instances where it is used with the newer version. However, there is a separate discussion around why we are Logging anything at all in the test suites. My other inclination would be to comment those lines out entirely as they should not be needed.

voltone commented 1 year ago

Thanks for the PR.

So Logger.warn has been deprecated in favor of Logger.warning.

This was discussed in #65: I'm not ready to drop support for all those older Elixir versions. If we want to get rid of warnings on newer versions we're going to have to wrap the Logger call in a macro that selects the appropriate function for the current Elixir version.

However, there is a separate discussion around why we are Logging anything at all in the test suites. My other inclination would be to comment those lines out entirely as they should not be needed.

Those test modules are not strictly part of the test suite: they are used by the packages' own tests, but are also available for use in relying project's unit tests or other test environments. I have considered moving those into a separate package, as most projects do not use them. But that would be a breaking change, so probably best left for a 1.0 release. Maybe it is time to start planning for that...

tomciopp commented 1 year ago

@voltone I've updated the code to use a Utility function that checks for the existence of Logger.warning/2. Looks like the CI is passing and I've double checked that it works on my local machine. LMKWYT.

voltone commented 1 year ago

Thanks @tomciopp, that's exactly what I had in mind!

voltone commented 1 year ago

Published as v0.8.8