Dead code elimination partially disabled
Author: seanamosCreated Mar 10, 2026Updated Apr 23, 2026
Labelsarea/v3
urfave/cli directly uses text/template, and unfortunately this partially disables dead code elimination. However, "partial" in this context can result in significantly larger binaries depending on how many other dependencies you have. Full DCE can result in significant binary size reductions (50%+-).
Cobra recently added a fix/workaround for a similar issue: https://github.com/spf13/cobra/pull/1956
I appreciate there may not be a non-breaking way to solve this in v3.
Source: urfave/cli