Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to remove file target/debug/tmp #9783

Closed
Tracked by #87749
tmandry opened this issue Aug 12, 2021 · 3 comments · Fixed by #9814
Closed
Tracked by #87749

failed to remove file target/debug/tmp #9783

tmandry opened this issue Aug 12, 2021 · 3 comments · Fixed by #9814
Labels
A-layout Area: target output directory layout, naming, and organization C-bug Category: bug P-high Priority: High regression-from-stable-to-beta Regression in beta that previously worked in stable.

Comments

@tmandry
Copy link
Member

tmandry commented Aug 12, 2021

A couple of crates are failing to build in 1.55 that passed in 1.54 (rust-lang/rust#87749):

In the first one, the tmp crate is used, but not the second. But both are failing to remove the file tmp.

Not sure if this is spurious or what. I haven't reproduced it yet. Also maybe related to #6313 (comment).

@tmandry tmandry added the C-bug Category: bug label Aug 12, 2021
@ehuss
Copy link
Contributor

ehuss commented Aug 12, 2021

Oh my, not sure how I didn't think about that. This is caused by #9375, and any project that has a tmp binary target will fail to run tests.

@ehuss ehuss added A-layout Area: target output directory layout, naming, and organization P-high Priority: High regression-from-stable-to-beta Regression in beta that previously worked in stable. labels Aug 12, 2021
@joshtriplett
Copy link
Member

joshtriplett commented Aug 13, 2021

Ah, makes sense. Sounds like we need to move the tmpdir's location to be something that can't conflict with a valid binary name.

@joshtriplett
Copy link
Member

We discussed this in today's @rust-lang/cargo meeting, and we decided to move this to target/tmp (and prohibit having a custom profile named tmp, to avoid conflicts).

@bors bors closed this as completed in 216f915 Aug 20, 2021
ehuss pushed a commit to ehuss/cargo that referenced this issue Aug 21, 2021
Move `tmp` test directory.

The `tmp` directory added in rust-lang#9375 was placed within the profile directory (such as `target/debug/tmp` or `target/release/tmp`).  This causes problems for any cargo target (binary, test, etc.) with the name `tmp` as there is a name collision.  This PR attempts to address that by moving the `tmp` directory to the root of the target directory (`target/tmp`), and reserving the profile name "tmp".

Fixes rust-lang#9783
@EricCml EricCml mentioned this issue Feb 14, 2023
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout Area: target output directory layout, naming, and organization C-bug Category: bug P-high Priority: High regression-from-stable-to-beta Regression in beta that previously worked in stable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants