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.

Better name for [[dependencies]] #509

Closed
@sdboyer

Description

@sdboyer

The [[dependencies]] field name in Gopkg.toml is misleading and problematic. Most people see it and assume that it works in the same way other language package managers do - you have to declare dependencies in Gopkg.toml for dep to pull them in at all.

But that's not how dep works - import statements in the code itself are the bit that define what code is required. Gopkg.toml just applies rules and constraints to control how those imports are satisfied.

The key should be renamed accordingly. The two possibilities I can immediately think of are constraints or rules, though I don't especially love either. Here are some relevant considerations:

  1. Remember that overrides also exist, and supercede what we today call dependencies. While the name needn't necessarily reflect this relationship, it should at least not be contrary to it.
  2. Each dependencies item can specify an alternate source - not just the version constraint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions