Commit 739637f
committed
mod+tools: add dummy import for CLI dependencies
With go 1.16 something changed in how the content of go.sum is
calculated. The "go mod tidy" command now removes dependencies for
packages that aren't directly referenced through the main package.
Therefore if we compile another binary (such as the CLI binaries we ship
together with LiT) some of their dependencies might have been pruned
from go.sum. To avoid that, we add dummy imports for those packages
under a build tag that we don't actually use. The "tools" tag seems to
be the idiomatic tag for such tooling depencencies.1 parent 4e8db16 commit 739637f
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments