Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Slim utility binaries by reducing dependencies #3726

Merged
merged 3 commits into from
Jul 30, 2020
Merged

Conversation

bboreham
Copy link
Contributor

I got upset that weavewait was 25MB when compiled with Go 1.13, and when I investigated it seemed to be because it was pulling in Kubernetes and AWS files, which it doesn't need.

Unfortunately this turned into a lot of keyboarding, but I think all the changes are quite straightforward.
See individual commit messages.

The binary is 5MB after these changes, which still seems high, but much better than where I started.

bboreham added 3 commits July 29, 2020 12:55
We don't want everyone that uses the `net` package to get a transitive
dependency on the Kubernetes APIs required by `npc`.
We don't want everyone that uses the `net` package to get a transitive
dependency on the Kubernetes APIs, so have it define the `UID` type.

Conceptually this is a simple change because `UID` is a `string`, but
unfortunately it is used in a lot of places.
This means that users don't drag in a dependency on aws-sdk.
@bboreham bboreham force-pushed the slim-dependencies branch 2 times, most recently from 48b6315 to 6bc656d Compare July 29, 2020 16:45
@bboreham bboreham merged commit 4d3e8d4 into master Jul 30, 2020
@bboreham bboreham deleted the slim-dependencies branch July 30, 2020 13:13
@bboreham bboreham added this to the 2.7 milestone Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant