Skip to content

Leaking private type YF from yamlFormatX #48

@srdo

Description

@srdo

Hi.

The yamlFormatX methods in ProductFormats return the YF[A] type. This type is private to moultingyaml, and is an alias for YamlFormat[A]. This causes a problem for tools like Scalafix or IntelliJ.

Say you have a declaration like

implicit val myFormat = yamlFormat1(SomeClass)

If you ask Scalafix or IntelliJ to add a type annotation, it will add YF[SomeClass], which will break the build, as YF is not accessible outside moultingyaml.

I think the easy fix is to make YF accessible to everyone. The slightly nicer fix is probably to drop the type alias from moultingyaml, and just use YamlFormat in the API instead.

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