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

travis: ensure dependencies are encoded in go.mod #706

Closed
wants to merge 1 commit into from

Conversation

jeanbza
Copy link
Collaborator

@jeanbza jeanbza commented May 24, 2019

Currently a user can add new deps in *.go files that do not exist in the
go.mod/go.sum. This commit adds a small check in CI to ensure that no new
deps were added that aren't in the go.mod/go.sum.

@jeanbza jeanbza force-pushed the prevent_future_mod_issues branch from 7a91c80 to 7fbb39a Compare May 24, 2019 15:11
Currently a user can add new deps in *.go files that do not exist in the
go.mod/go.sum. This commit adds a small check in CI to ensure that no new
deps were added that aren't in the go.mod/go.sum.

This commit includes a run of `go mod tidy`.
@jeanbza jeanbza force-pushed the prevent_future_mod_issues branch from 7fbb39a to 1a6bfab Compare May 28, 2019 14:46
@sagikazarmark
Copy link
Collaborator

A slightly better option would be turning on readonly mode for go modules. Compilation will fail if there are missing dependencies.

For example: https://github.com/sagikazarmark/modern-go-application/blob/master/.travis.yml#L20

@sagikazarmark
Copy link
Collaborator

I added the readonly flag so the build should fail if dependencies are missing.

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 this pull request may close these issues.

None yet

2 participants