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

staticcheck being included in go.mod pulls in a lot of unnecessary dependencies #3

Open
printfn opened this issue Oct 4, 2024 · 0 comments

Comments

@printfn
Copy link

printfn commented Oct 4, 2024

Thank you for creating this library! Unfortunately there is an issue with how this repo includes staticcheck in the go.mod and tools.go files. Despite staticcheck only being used for linting, as a dev-only dependency, it is being pulled in as a standard dependency. This causes any other go package that uses go-cache to also pull in staticcheck and all of its dependencies, significantly increasing download and build times.

Since your Makefile simply invoked staticcheck as staticcheck ./..., this doesn't actually need staticcheck to be a dependency listed in go.mod, you can instead install it using go install honnef.co/go/tools/cmd/staticcheck@latest. This should let you remove it from the go.mod and tools.go files.

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

1 participant