Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Add metadata field to Gopkg.toml; warn on unknown fields #506

Closed
@sdboyer

Description

@sdboyer

As part of #276, we want to be able to provide a bit of future-proofing against the likelihood that we're going to need to add more properties to the data in Gopkg.toml and Gopkg.lock (e.g. for #291).

To that end, we should take (yet another) note from Cargo, and

  1. Introduce a [project.metadata] field in Gopkg.toml, which should be ignored by the parser except to enforce that it's a map type.
  2. Warn if we encounter any unknown fields in Gopkg.toml. This should help discourage unintentional use, and channel anything that users want to add into that metadata.

This may be a bit awkward, given that we don't have a project field to start with. I'm going with that, though, because I think it's likely we'll end up adding one. However, if that's too much of a pain, I'd also be good with just having a [metadata] top-level field.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions