Skip to content

x/text: usage of text/template or html/template disables compiler DCE #72787

@xaurx

Description

@xaurx

Go version

go 1.24

Output of go env in your module/workspace:

irrelevant

What did you do?

x/text package uses text/template package which disables DCE (dead code elimination) in compiler due to usage of specific reflect methods. This typically executable binary size by 25-30%.

What did you see happen?

Increases executable size

What did you expect to see?

Smaller executable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions