You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks, I finally had some time to play with this.
Unfortunately it seems many of the :public_key types I was referencing in the typespecs are actually not exported, even though they are mentioned in the docs. So while those references are useful for the purpose of documentation (they highlight how X509 interworks with :public_key), Dialyzer chokes on them.
Replacing those references with new types in X509.ASN1 not only makes it harder to match types with the :public_key docs, it also necessitates documenting the ASN1 module.
Need to think about this some more. Having said all that, Dialyzer did find some real issues in my specs.
I'm of the opinion that some Dialyzer is better than no Dialyzer. If you've had your fill for now, you can always add an ignore file. My dialyzer.ignore for projects using X509 seems to be this currently:
:0: Unknown type 'Elixir.X509.ASN1':record/1
:0: Unknown type public_key:ec_private_key/0
:0: Unknown type public_key:ec_public_key/0
:0: Unknown type public_key:rsa_private_key/0
:0: Unknown type public_key:rsa_public_key/0
:0: Unknown type public_key:issuer_name/0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a few Dialyzer warnings in x509. If you'd like to take a look, this change should get you started.