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
Description
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:
- Remember that
overrides
also exist, and supercede what we today calldependencies
. While the name needn't necessarily reflect this relationship, it should at least not be contrary to it. - Each
dependencies
item can specify an alternatesource
- not just the version constraint.