-
Notifications
You must be signed in to change notification settings - Fork 1k
Better name for [[dependencies]] #509
Comments
I vote for I don't mind that the |
@spenczar thanks for weighing in 😄 i've had similar thoughts about using Alternate suggestions still welcome too, of course! |
[[requirements]] ? (Maybe easy_install was on to something)
… On 4 May 2017, at 02:00, sam boyer ***@***.***> wrote:
@spenczar thanks for weighing in 😄 i've had similar thoughts about using [[constraints]]. If we can get at least some informal indications that this matches other peoples' intuitions, I'm happy to go that direction.
Alternate suggestions still welcome too, of course!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
(requirements is easier to pronounce than constraints 😄) |
Possible slight improvement
[[requires]]
… On 4 May 2017, at 17:51, cwgt ***@***.***> wrote:
(requirements is easier to pronounce than constraints 😄)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Oh, I'd like to switch my vote to I like |
Hmm, interesting. so, i'd considered Now, we could rename that too - but it's named that way because of this larger issue that "required" seems to me to be ambiguous between:
We get a lot of questions about this as it is (I should make an FAQ item for it, right now it's only referenced obliquely); people are often surprised, especially coming from other language systems, that Gopkg.toml's list of dependencies are merely constraints, rather than being full-blown statements of requirement. Part of my goal with renaming this is to help clarify this distinction. It seems like calling it |
Hi, I'm new here. Sorry for silly questions:
In any way I can pick this one as first PR :) |
@sdboyer, you make some really excellent points there. I didn't remember that I think I'm maybe back to Team Constraints, but I'm confident that the bike shed will be a lovely color, whatever it gets painted as. :) |
I prefer constraints because as @spenczar said it better reveals the intent, constraining discovered packages, instead of acting as the "one true list" of dependencies/requirements. #TeamConstraints |
@anjmao hi, welcome! 😄
Yeah, since we're using TOML, singular seems like a much better idea - each time you see
It's pretty different from that, actually. These values are rules that are applied to projects - trees of packages with a root that's almost always the repository root, e.g.
That'd be awesome, once we settle on what to do 😄 |
I agree with the opinion that
EDIT: I was just reading the dep: updated command spec document, and noticed that the
🙄 |
@ibrasho and At this point, it looks like |
Yeah, OK, let's move ahead with Some notes/guidelines for this:
|
@sdboyer If still got this issue to solve, I can get it. Has anyone caught it? |
@felipeweb sweet! go for it 😄 🎉 |
@sdboyer Ah, too late :D I will look for another one :) |
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 fordep
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
orrules
, though I don't especially love either. Here are some relevant considerations: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.dependencies
item can specify an alternatesource
- not just the version constraint.The text was updated successfully, but these errors were encountered: