Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unecessary external dependencies are being downloaded. #1566

Closed
JeremyLoy opened this issue Sep 23, 2018 · 4 comments
Closed

Unecessary external dependencies are being downloaded. #1566

JeremyLoy opened this issue Sep 23, 2018 · 4 comments
Assignees

Comments

@JeremyLoy
Copy link
Contributor

Description

When declaring gin as a dependency using the latest master commit, unnecessary dependencies are declared in your go.mod/go.sum due to the examples/ directory containing executable go programs.

Those programs should be removed or moved to another Github repository.

Steps to reproduce

  1. make a sample hello-world application using go modules and gin.
  2. declare gin@master as a dependency using go get github.com/gin-gonic/gin@master
  3. observe that unnecessary dependencies such as google.golang.org/grpc v1.15.0, google.golang.org/appengine etc are added to your own go.sum
@thinkerou
Copy link
Member

thinkerou commented Sep 29, 2018

#1569 merged!

@thinkerou
Copy link
Member

ref: golang/go#28156 #1604

@xiaost
Copy link

xiaost commented Dec 7, 2018

I think https://github.com/gin-gonic/gin/blob/master/tools.go is one of the evils.
Many dependency management tools may introduce grpc by the import in tools.go

appleboy pushed a commit that referenced this issue Jan 25, 2019
#1604 #1566 #1700 #1737 

because some dependencies only are used on example i.e. grpc.

Or migrate `examples` to gin-gonic/examples`?
@thinkerou
Copy link
Member

@xiaost tools.go have removed!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants