Skip to content

Dialyzer and opaque types #20

@fhunleth

Description

@fhunleth

I'm currently fighting Dialyzer warnings since I periodically need to reach into various types. For example, part of a program I'm working on manages X.509 certificates in a compressed format. I have code that pulls out fields from the X509.Certificate (like the signature and validity) and then puts them into an analogous, but smaller data structure.This causes a problem with Dialyzer since many types in x509 are declared opaque.

Making the types non-opaque is a fix, but I'm not sure if that's the direction you wanted for this library.

This is probably a rare use case, but if you'd like to see some partially complete code, it's here: https://github.com/fhunleth/atecc508a/blob/real_hw/lib/atecc508a/certificate.ex#L60. To pass Dialyzer, I currently need to remove the opaque on X509.Certificate.t(), X509.Certificate.Extension.t(), and X509.Certificate.Validity().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions