Skip to content

hack/make.sh: disable compiling "gogo-protobuf" in typeurl#48833

Closed
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:no_gogo
Closed

hack/make.sh: disable compiling "gogo-protobuf" in typeurl#48833
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:no_gogo

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

commit 0af6203 updated typeurl to v2.2.3, which now provides a no_gogo build-tag to allow compiling without gogo- protobuf support. BuildKit v0.17 and above no longer require gogo-protobuf, so we can use this build-tag to disable it.

Note that SwarmKit still uses gogo-protobuf, but doesn't use typeurl, so this change wont affect that code.

- A picture of a cute animal (not mandatory but encouraged)

commit 0af6203 updated typeurl to v2.2.3,
which now provides a `no_gogo` build-tag to allow compiling without gogo-
protobuf support. BuildKit v0.17 and above no longer require gogo-protobuf,
so we can use this build-tag to disable it.

Note that SwarmKit still uses gogo-protobuf, but doesn't use typeurl, so
this change wont affect that code.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review area/packaging kind/refactor PR's that refactor, or clean-up code labels Nov 7, 2024
@thaJeztah thaJeztah added this to the 28.0.0 milestone Nov 7, 2024
@thaJeztah thaJeztah requested a review from tianon as a code owner November 7, 2024 12:27
Comment thread vendor.mod
github.com/containerd/log v0.1.0
github.com/containerd/platforms v0.2.1
github.com/containerd/typeurl/v2 v2.2.3
github.com/containerd/typeurl/v2 v2.2.3 // TODO(thaJeztah): remove "no_gogo" build-tag from hack/make.sh once we update to v2.3.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next (v2.3.0) version removes it entirely; see

@cpuguy83
Copy link
Copy Markdown
Member

cpuguy83 commented Nov 7, 2024

Glad that CI passes, however I'm not sure this is really needed since we already have a hard dependency on gogo due to swarmkit.
This build tag just excludes gogo support from typeurl, which doesn't actually exclude gogo from our compiled binary since we use gogo in other places.

@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Nov 7, 2024

Yeah, that's a good point; I actually thought that it would save some space when not compiling it for this package, but .. savings are .. erm... minimal;

diff -u before.txt after.txt
--- before.txt	2024-11-07 20:44:17.920670958 +0000
+++ after.txt	2024-11-07 20:44:48.465303010 +0000
@@ -6,7 +6,7 @@
 -rwxr-xr-x  1 root root 19595416 Nov  7 20:44 ctr
 -rwxr-xr-x  1 root root   601288 Nov  7 20:44 docker-init
 -rwxr-xr-x  1 root root  2408597 Nov  7 20:44 docker-proxy
--rwxr-xr-x  1 root root 71620664 Nov  7 20:44 dockerd
+-rwxr-xr-x  1 root root 71618616 Nov  7 20:44 dockerd
 -rwxr-xr-x  1 root root    15149 Nov  7 20:44 dockerd-rootless-setuptool.sh
 -rwxr-xr-x  1 root root     7249 Nov  7 20:44 dockerd-rootless.sh
 -rwxr-xr-x  1 root root 12625520 Nov  7 20:44 rootlesskit

Minimal as in; 71620664 - 71618616 = 2048 😂

I guess that's .. very minimal

@thaJeztah thaJeztah closed this Nov 7, 2024
@thaJeztah thaJeztah deleted the no_gogo branch November 7, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants