Skip to content

test to_string_in_format_args_incremental fails in a read-only working directory #11126

New issue

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

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

Already on GitHub? # to your account

Open
Noratrieb opened this issue Jul 8, 2023 · 3 comments

Comments

@Noratrieb
Copy link
Member

Description

The test creates a file in the current working directory, which doesn't work in rust-lang/rust CI. It should be changed to create the incremental directory somewhere else, I'm not sure what the best solution would be here.

//@run-rustfix
//@compile-flags: -C incremental=target/debug/test/incr

// see https://github.com/rust-lang/rust-clippy/issues/10969

fn main() {
    let s = "Hello, world!";
    println!("{}", s.to_string());
}

I deleted the test in rust-lang/rust#113450 so it will be removed in the next sync.

cc @Alexendoo @flip1995 @oli-obk

Version

master, 3a1fc266654b9b56c07554eff3d5956bb84d8ef5

Additional Labels

No response

@Noratrieb Noratrieb changed the title test to_string_in_format_args_incremental fails in a read-only file system test to_string_in_format_args_incremental fails in a read-only working directory Jul 8, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jul 10, 2023

We could add some variable-replacement scheme so that we can specify $TMP_DIR which would give every test its very own temporary directory

bors added a commit that referenced this issue Sep 12, 2023
Ignore span's parents in `collect_ast_format_args`/`find_format_args`

Fixes #11470, covers some cases missed by #10980

Can't have a test yet because of #11126 but it works locally

changelog: none

r? `@dswij`
@utkrsharmaa
Copy link

I am currently getting this issue as well, When i ran cargo uibless once, all tests passes except for the lint I'm currently working on. And then i got 2 failures after running cargo test --test compile-test -- --bless and one of them was to_string_in_format_args_incremental.fixed.

I'm not experienced enough to know what the solution is and am currently stuck because of this. An update on the situation would be reassuring, Thank you all.

@Alexendoo
Copy link
Member

What was the other, and could you show the errors @utkrsharmaa?

Also huh, the test still exists in the clippy repo

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants