Skip to content

mix hex.build: Revisit basic metadata validations #916

@wojtekmach

Description

@wojtekmach

A brand new Mix project would trigger these warnings when executing mix hex.build:

** (Mix) Stopping package build due to errors.
Missing metadata fields: description, licenses, links

It is very easy to make the build pass by giving these "zero" values:

package: [
  licenses: [],
  links: %{},
  description: ""
]

which makes me think, should we either:

  1. add basic validations, licenses/links are non-empty lists, description is non-empty string
  2. make the "zero" values the defaults
  3. like 2, except empty licenses trigger a warning (https://github.com/hexpm/hex/pull/915/files#diff-06919f8ea819ec0528faa886d5f8ef7ff61d8564b9743a41d37636e286906c1bR199)

I think option 3 is the most appropriate. Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions