Commit 5ae5d96
committed
build: disable tracing support for gRPC
The goal is to be able to reenable full dead code elimination that is
prevented by non-constant calls to reflect.MethodByName(). There are
many other culprits for this:
```
08:04 ❱ go build -o /dev/null -tags release,grpcnotrace -ldflags=-dumpdep . |& go run github.com/aarzilli/whydeadcode@latest
github.com/go-playground/validator/v10.tryCallValidateFn reachable from:
github.com/go-playground/validator/v10.isValidateFn
github.com/go-playground/validator/v10.isValidateFn·f
github.com/go-playground/validator/v10.map.init.11
github.com/go-playground/validator/v10.bakedInValidators
github.com/go-playground/validator/v10.New
akvorado/common/helpers.init.1
akvorado/common/helpers..inittask
go:main.inittasks
_
github.com/expr-lang/expr/builtin.get reachable from:
github.com/expr-lang/expr/builtin.get·f
github.com/expr-lang/expr/builtin..stmp_53
github.com/expr-lang/expr/builtin..stmp_0
github.com/expr-lang/expr/builtin.init
github.com/expr-lang/expr/builtin..inittask
go:main.inittasks
_
github.com/expr-lang/expr/checker/nature.Nature.All reachable from:
type:github.com/expr-lang/expr/checker/nature.Nature
type:func() github.com/expr-lang/expr/checker/nature.Nature
type:github.com/expr-lang/expr/ast.Node
type:github.com/expr-lang/expr/vm.Program
type:*github.com/expr-lang/expr/vm.Program
type:akvorado/outlet/core.ExporterClassifierRule
type:[]akvorado/outlet/core.ExporterClassifierRule
type:akvorado/outlet/core.Configuration
type:akvorado/cmd.OutletConfiguration
type:[]akvorado/cmd.OutletConfiguration
type:akvorado/cmd.OrchestratorConfiguration
type:*akvorado/cmd.OrchestratorConfiguration
internal/abi..dict.TypeFor[akvorado/cmd.OrchestratorConfiguration]
reflect..dict.TypeFor[akvorado/cmd.OrchestratorConfiguration]
akvorado/cmd.init.6.orchestratorClickHouseMigrationHook.func2
akvorado/cmd.init.6.orchestratorClickHouseMigrationHook.func2·f
akvorado/cmd.init.6
akvorado/cmd..inittask
go:main.inittasks
_
text/template.(*state).evalField reachable from:
text/template.(*state).evalFieldChain
text/template.(*state).evalCommand
text/template.(*state).evalPipeline
text/template.(*state).walk
text/template.(*Template).execute
akvorado/console/authentication.(*Component).UserAuthentication.func1
akvorado/console/authentication.(*Component).UserAuthentication
type:*akvorado/console/authentication.Component
akvorado/cmd.consoleStart
akvorado/cmd.init.func3
akvorado/cmd.init.func3·f
akvorado/cmd..stmp_2
akvorado/cmd.init
akvorado/cmd..inittask
go:main.inittasks
_
gorm.io/gorm/schema.ParseWithSpecialTableName reachable from:
gorm.io/gorm.(*DB).assignInterfacesToValue
gorm.io/gorm.(*DB).FirstOrInit
type:*gorm.io/gorm.DB
type:akvorado/console/database.Component
akvorado/cmd.consoleStart
akvorado/cmd.init.func3
akvorado/cmd.init.func3·f
akvorado/cmd..stmp_2
akvorado/cmd.init
akvorado/cmd..inittask
go:main.inittasks
_
gorm.io/gorm/schema.ParseWithSpecialTableName reachable from:
gorm.io/gorm.(*DB).assignInterfacesToValue
gorm.io/gorm.(*DB).FirstOrInit
type:*gorm.io/gorm.DB
type:akvorado/console/database.Component
type:*akvorado/console/database.Component
akvorado/cmd.consoleStart
akvorado/cmd.init.func3
akvorado/cmd.init.func3·f
akvorado/cmd..stmp_2
akvorado/cmd.init
akvorado/cmd..inittask
go:main.inittasks
_
github.com/expr-lang/expr/vm/runtime.FetchMethod reachable from:
github.com/expr-lang/expr/vm.(*VM).Run
github.com/expr-lang/expr/vm.Run
akvorado/outlet/core.(*ExporterClassifierRule).exec
akvorado/outlet/core.(*Component).classifyExporter
akvorado/outlet/core.(*worker).enrichFlow
akvorado/outlet/core.(*worker).processIncomingFlow.func1
akvorado/outlet/core.(*worker).processIncomingFlow
akvorado/outlet/core.(*worker).processIncomingFlow-fm
akvorado/outlet/core.(*Component).newWorker
akvorado/outlet/core.(*Component).newWorker-fm
akvorado/outlet/core.(*Component).Start
type:*akvorado/outlet/core.Component
akvorado/cmd.outletStart
akvorado/cmd.init.func7
akvorado/cmd.init.func7·f
akvorado/cmd..stmp_6
akvorado/cmd.init
akvorado/cmd..inittask
go:main.inittasks
_
```
For gorm, we have go-gorm/gorm#7643. We could
replace text/template by something else as our usage is quite light. For
validator, it may be addressable upstream by disallowing calls to
configurable validator function through a tag. For expr, it looks more
complex.
Then, regression should be detected by CI.1 parent c4d3c59 commit 5ae5d96
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments