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

How to completely remove dataloaden from go.mod? #1715

Closed
frederikhors opened this issue Nov 15, 2021 · 2 comments · Fixed by #1734
Closed

How to completely remove dataloaden from go.mod? #1715

frederikhors opened this issue Nov 15, 2021 · 2 comments · Fixed by #1734

Comments

@frederikhors
Copy link
Collaborator

frederikhors commented Nov 15, 2021

What happened?

I removed dataloaden from my project (because of this) but I'm still having dataloden in my go.mod as an indirect dependency. Why?

go 1.17

require (
  ...
  github.com/99designs/gqlgen v0.14.0
  github.com/graph-gophers/dataloader/v6 v6.0.0
  github.com/vektah/gqlparser/v2 v2.2.0
  ...
)

require (
  ...
  github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e // indirect
  ...
)

I searched in project for "dataloaden" but nothing appears except for example dir. Is this the problem?

I also tried with:

go mod why github.com/vektah/dataloaden

in my project, which shows:

# github.com/vektah/dataloaden
myProject/lib/gqlgen
github.com/99designs/gqlgen
github.com/vektah/dataloaden

What did you expect?

To remove it completely.

versions

  • gqlgen version v0.14.0
  • go version 1.17.3
@duckbrain
Copy link
Contributor

duckbrain commented Nov 30, 2021

From go help packages:

Directory and file names that begin with "." or "_" are ignored
by the go tool, as are directories named "testdata".

You could rename example to _examples. That should get all of the Go tooling to ignore the whole directory. My testing on my machine indicates that the projects inside of _examples would still function normally if directly compiled. ie: go install ./_examples/dataloader works but go install ./_examples/... will have "matched no packages"

@frederikhors
Copy link
Collaborator Author

Thanks @duckbrain.

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

Successfully merging a pull request may close this issue.

2 participants