Skip to content

cargo clean -Zbuild-dir-new-layout -p foo does not clean uplifted example depinfo files #16302

@epage

Description

@epage

Problem

#16300 mirrors some clean.rs tests into clean_new_layout but assert_all_clean fails on several tests because dep info files remain.

#16300 introduces support for removing uplifted files but the examples have a hash in them and so doesn't get removed.

For some reason, it looks like the non-upllifted content in the old build layout is what is deleting the uplifted dep info?

Steps

$ cargo new foo
$ cd foo
$ mkdir examples
$ echo "fn main() {}" > examples/foo.rs
$ cargo +nightly build -Zbuild-dir-new-layout
$ cargo clean -Zbuild-dir-new-layout -p foo
$ ls target/debug/examples

And see the dep info files still there

Or

Uncommit the assert_all_clean lines from clean_new_layout.rs and add the assert function in from clean.rs

Possible Solution(s)

No response

Notes

Conditionally add a glob for hashes based on the TargetKind

Version


Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layoutArea: target output directory layout, naming, and organizationC-bugCategory: bugCommand-cleanS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions