Options affect the generated code, so use a hash of any options for the toolexec version.
()
| 87 | // Options affect the generated code, so use a hash |
| 88 | // of any options for the toolexec version. |
| 89 | func (p *toolExecParams) versionCacheKey() string { |
| 90 | withoutTool := *p |
| 91 | withoutTool.flags = nil |
| 92 | withoutTool.Tool = "" |
| 93 | withoutTool.ToolArgs = nil |
| 94 | |
| 95 | optStr := fmt.Sprintf("%v", withoutTool) |
| 96 | optHash := md5.Sum([]byte(optStr)) |
| 97 | return hex.EncodeToString(optHash[:]) |
| 98 | } |
| 99 | |
| 100 | func (p *toolExecParams) requiredPackage(pkg string) bool { |
| 101 | for _, selector := range p.RequiredPkgSelectors { |