Open fhunleth opened 6 years ago
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
There are a few Dialyzer warnings in x509. If you'd like to take a look, this change should get you started.