Commit d742813
committed
fix(publish): Move
When `target_dir == build_dir`, ensure `cargo publish` doesn't put
intermediate artifacts in the final artifact location of `cargo
package`.
If anyone was relying on this behavior of `cargo publish`, it will break
them.
We could avoid this and instead consider the location change to be part
of the opt-in of using `build-dir` (until we make it opt-out).
Note that we expect to be able to change the layouf of content written
to `build-dir` even if users aren't opting in.
On the other hand, this will help identify people relying on
intermediate artifacts.
While there aren't any performance benefits to this, it consolidates all
of the uplifting logic and avoids dealing with overlapping `target_dir`
and `build_dir`.
We could optimize this further by doing a `rename` and only doing a copy
if that fails..crate out of final artifact location1 parent 78a5531 commit d742813
1 file changed
+19
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 163 | + | |
| 164 | + | |
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
| |||
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | 176 | | |
186 | 177 | | |
187 | 178 | | |
188 | | - | |
| 179 | + | |
189 | 180 | | |
190 | 181 | | |
191 | 182 | | |
| |||
219 | 210 | | |
220 | 211 | | |
221 | 212 | | |
| 213 | + | |
222 | 214 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
238 | 229 | | |
239 | 230 | | |
240 | 231 | | |
| |||
0 commit comments