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

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

Closed
pnkfelix opened this issue May 6, 2014 · 4 comments

Comments

@pnkfelix
Copy link
Member

pnkfelix commented May 6, 2014

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.

@pnkfelix
Copy link
Member Author

pnkfelix commented May 6, 2014

(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
Copy link
Member Author

pnkfelix commented May 7, 2014

part of #8058

@steveklabnik
Copy link
Member

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

@alexcrichton
Copy link
Member

Make's now gone, so closing.

bors added a commit to rust-lang-ci/rust that referenced this issue Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants