Skip to content

make check: consider double-checking that temp files are not injected into non-standard places #13978

Closed
@pnkfelix

Description

@pnkfelix
Member

Spawned off of #13965.

Some of our tools generate, compile, and run code that has been written for e.g. documentation blocks. Sometimes those steps occur as part of standard make check runs.

It can be annoying to developers if such steps generate side garbage in the local file system. It is especially annoying for developers who do not run make in an isolated build directory, since then quite often it is the current working directory (i.e., their clone of the Rust repository) that gets garbage added to it.

It would be easy to say that the documentation writer was at fault for writing such a documentation block, or that another tool like rustdoc was at fault for not running "semi-trusted" code in an isolated semi-sandbox (i.e. a temporary directory).

But nonetheless, it seems like our Makefiles could guard against this, i.e. by taking a directory listing at the start of the build, and then comparing it against the directory listing at the end of the build, and filtering out the subdirectories that are known to be dedicated to build products, stamp files, logs, or temporary files.

Activity

pnkfelix

pnkfelix commented on May 6, 2014

@pnkfelix
MemberAuthor

(in case it is not clear: I do think I was at fault as the author of the code that causes #13965, but I also think our tools could done a better job of warning me about my fault up front. I do not want to have to switch to doing builds in the repository root myself just to catch mistakes like this...)

pnkfelix

pnkfelix commented on May 7, 2014

@pnkfelix
MemberAuthor

part of #8058

steveklabnik

steveklabnik commented on Mar 4, 2016

@steveklabnik
Member

Triage: I'm pretty sure this is still an issue, but will eventually go away with rustbuild.

alexcrichton

alexcrichton commented on Feb 11, 2017

@alexcrichton
Member

Make's now gone, so closing.

added a commit that references this issue on Feb 13, 2023

Auto merge of rust-lang#13978 - bvanjoi:array-match, r=Veykril

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@alexcrichton@pnkfelix

        Issue actions

          make check: consider double-checking that temp files are not injected into non-standard places · Issue #13978 · rust-lang/rust