-
Notifications
You must be signed in to change notification settings - Fork 1k
Warn when project constraint is missing in Gopkg.toml #1336
Comments
mmmm, almost - a |
Hey @sdboyer @darkowlzz can I pick this one up? |
@JackyChiu go for it! 👍 |
@sdboyer @darkowlzz The importers make entries like this when a constraint version/branch cannot be determined. Here's the original PR where that behavior was introduced #901. If we are going to start warning about config that dep itself is generating, then we'll need to change the importers to do something different. I can't find the original issue/discussion on why we use gps.any for the constraint, instead of ommitting it, but I thought it had to do with confusion around getting an empty manifest (but populated lock) after importing. UPDATE: Found them: #149 and I think somewhere in this monster issue #213. |
@carolynvs a quick update. I had a discussion with Sam about this and we decided to omit those projects from manifest for which we don't have proper/useful constraints. |
Thanks for the quick clarification! I've created #1373 to get the importers tweaked to match and flagged it with help wanted. |
For every project in
Gopkg.toml
, there should be a constraint (branch
,version
orrevision
). A project without any constraint doesn't tell anything useful todep
.For example, Gopkg.toml with a project:
should result in warning during manifest validation and tell the user to add a branch/version/revision constraint.
The text was updated successfully, but these errors were encountered: