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

Move tools to separate module #60

Merged
merged 4 commits into from
Sep 22, 2021
Merged

Move tools to separate module #60

merged 4 commits into from
Sep 22, 2021

Conversation

evseevbl
Copy link

@evseevbl evseevbl commented Sep 3, 2021

This PR aims to fix bloating go.sum and vendor with dependencies from tools.go.

I have created a project with one simple interface and no imports. After generating mocks and running go mod tidy && go mod vendor I end up with way too many dependencies, most of which are not required for minimock to function. Moving tools to a separate module significantly reduces both number of dependencies and size of vendor

Latest master:

wc -l ./pr1/go.sum
    1525 ./pr1/go.sum
du -sh ./pr1/vendor
    55M ./pr1/vendor

After this PR:

wc -l ./pr2/go.sum
    121 ./pr2/go.sum
du -sh ./pr2/vendor
    240K ./pr2/vendor

Code used to reproduce:

package main

type Adder interface {
	Add(a, b int) int
}

@evseevbl
Copy link
Author

evseevbl commented Sep 6, 2021

@hexdigest could you please have a look at this PR?

@hexdigest hexdigest merged commit 8bf8f48 into gojuno:master Sep 22, 2021
@hexdigest
Copy link
Collaborator

@evseevbl

I released v3.0.10 version which now has a hundred times less dependencies.
Thank you!

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.

2 participants