You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(publish): Move .crate out of final artifact location
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.
0 commit comments