Commit 14e2060
committed
estimate: Use the default
This avoids re-downloading the same modules (potentially hundreds of
megabytes for moderately sized binaries) over and over. The downside
is wasted disk space that the user must manually clear (`go clean
-modcache`).
Why keeping the downloaded modules is believed to be more useful than
automatically deleting them:
* It makes offline use possible.
* Packaging a complex module with lots of unpackaged dependencies
means a long slow process of chipping away at the dependencies.
It would be nice to be able to re-run `dh-make-golang estimate`
several times to track progress and plan next steps without
incurring a huge download cost.
* Developing `dh-make-golang estimate` itself involves re-running it
over and over to test changes. The interesting modules to test
are the complex ones, and those take a while to download.
* I believe that `golang-*-dev` package maintainers are already
accustomed to running `go clean -modcache`, an occasional
necessity with serious Go development.
* The modules don't actually need to be fully downloaded and
unpacked; only their `go.mod` files are necessary to construct a
dependency graph. Changing `dh-make-golang estimate` in a future
commit to only download just `go.mod` would address disk usage
concerns. It would also mean that re-downloading over and over
would be less of a problem, but keeping the `go.mod` files avoids
abusing proxy.golang.org and sum.golang.org.
This change makes `progressSize` not useful, so `go get`'s stdout and
stderr are passed through, and `-x` is passed to `go get` to get some
progress indication.GOPATH to cache downloads1 parent 7e0ed09 commit 14e2060
1 file changed
+16
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | | - | |
77 | 75 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
87 | 79 | | |
88 | 80 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 81 | + | |
| 82 | + | |
92 | 83 | | |
93 | 84 | | |
94 | 85 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 86 | | |
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
102 | 90 | | |
103 | 91 | | |
104 | 92 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
111 | 98 | | |
112 | 99 | | |
113 | 100 | | |
| |||
120 | 107 | | |
121 | 108 | | |
122 | 109 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 110 | | |
127 | 111 | | |
128 | 112 | | |
| |||
207 | 191 | | |
208 | 192 | | |
209 | 193 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 194 | + | |
217 | 195 | | |
218 | 196 | | |
219 | 197 | | |
| |||
226 | 204 | | |
227 | 205 | | |
228 | 206 | | |
229 | | - | |
| 207 | + | |
230 | 208 | | |
231 | 209 | | |
232 | 210 | | |
| |||
237 | 215 | | |
238 | 216 | | |
239 | 217 | | |
240 | | - | |
| 218 | + | |
241 | 219 | | |
242 | 220 | | |
243 | 221 | | |
| |||
246 | 224 | | |
247 | 225 | | |
248 | 226 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | 227 | | |
253 | 228 | | |
254 | 229 | | |
255 | 230 | | |
256 | 231 | | |
257 | 232 | | |
258 | | - | |
| 233 | + | |
259 | 234 | | |
260 | 235 | | |
261 | 236 | | |
| |||
0 commit comments