-
Notifications
You must be signed in to change notification settings - Fork 1k
documentation: is "dep" replacing "go get" #376
Comments
I would say that
Essentially I use |
I'm pretty much in line with @carolynvs' response, here. Also, more or less this question was asked on reddit today, and I responded over there. Basically - exactly what will happen is unclear, but the long term vision is a sane, overall-consistent |
That makes sense. It would be awesome to make sure this is mentioned somewhere to ensure people understand the scopes. Feel free to close the ticket. |
Definitely. I've added a 'docs' label, which is equivalent to putting it on that TODO list :) |
What are peoples thoughts on editors with linters, from my experience using a couple of editors with go integration (atom/vs code) is that the bundled linters work against the typical dep flow (thanks @carolynvs for sharing your flow because it helped my understanding a lot). The behaviour I see it that autocomplete doesn't work unless you have the package loaded, and typically on save linters will remove unused imports. So you get a situation where you need to have code that would work in your editor and saved, before you can use dep to load the dependency into the vendor directory. If the linter does not think your code uses the packaged dependency, the linter will delete the "unused" import. So no new dependency to A possible solution would be that calling dep ensure "package" would include the package as a dependency regardless of whether the package was referenced in a imports statement. You could argue that this is an editor / linter issue, but auto formatting and linting is a pretty useful and commonly practice it seems to me. |
Ah just read the v2 spec with the --add command. Looks great, though I wonder about the expectation that this would be rare. |
@sarge (welcome!) as you note, the updated spec should help this along, though i do anticipate there'll still be some pain. i see the problem more as operating in a reverse direction, though. ordinarily, my editor-assisted flow goes something like this:
so, i'm imagining the challenge here will be less about the case of an unused import going away; that still seems like a pretty normal bit of cleanup to me, and triggering a i haven't looked at
I say (search location) rather than just |
@sdboyer first thanks for your efforts. Lots of moving parts and lots of stakeholders, your approach of sketching a vision for the future and making pragmatic steps forward today feels right. From my limited experience goimports as of today will only use local packages, so you will get a different experience based on whether you have used this package before or not. |
Closing now that the original question (dep vs go get) has been answered in the FAQ. |
I'd just like to comment that the use of |
@paulwalker Can you help me understand what part of dep's config breaks |
@carolynvs Please see: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html. Dep does not have a problem with this, it allows users to define a |
@paulwalker yep yep - which is a problem, as long as you're not committing teaching |
Hmm, so I guess I could just commit the packages to |
@sdboyer, @carolynvs So, I'm still struggling with something. The issue is that we have another package (our How would you suggest dealing with this? @sdboyer, FYI I sat in your talk in Denver last month, thus I'm here now using |
excellent! 😄 😄 🎉 unfortunately, i don't quite understand the situation you're describing. are you saying that you have this |
Yes, as developers work on both Is it not possible for go dependency resolution to always use PWD |
ah, yup, you're also in the multi-project workflow trap 😢 we don't have a good answer for this right now, unfortunately. however, https://github.com/GetStream/vg may help. |
So far I've build using
When using dep, should one still run
go get
? Or ratherThe text was updated successfully, but these errors were encountered: