Skip to content

Use of text/template is causing DCE (dead code elimination) to be disabled #7903

Description

@kruskall

Short description

text/template usage is causing DCE (dead code elimination) to be disabled for opa and any application depending on it.

Use of text/template outside of tests should be avoided or replaced with another templating library

imports:

"text/template"

"text/template"

"text/template"

Steps To Reproduce

  • build opa or add a dependency on the opa go package
  • observe large binary with DCE disabled

Expected behavior

Small binaries with DCE enabled

Additional context

See golang/go#72895

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions