Skip to content

Windows CI is failing #641

Description

@sourcefrog

Also, this seems to break the Windows tests: could you please take a look? Thanks

@sourcefrog I've poked at this (using LLM assistance to make more sense of the build logs), and I think the failures on Windows are due to a regression in the nightly Rust on Windows: your path-lengths in the test runner setup are close to the maximum path length of 259 chars, and build-dir layout v2 was recently enabled by default on nightly, which adds length to the build directory paths. In your case I think it pushes it over the limit and you get a generic linker failure on Windows under the nightly toolchain. I suspect that this happened on this PR in particular simply because it was the first PR to land since the relevant update to nightly, and that the failures are uncorrelated with the actual content of the PR.

When the build-dir layout v2 changes hit stable, you'll probably want to have changed cargo-mutants so that it uses shorter paths for tempfiles; I leave this to your taste since I have not had enough time to familiarize myself with your codebase to PR this, but Claude suggests something like this might work:

/// Windows' 259-char usable MAX_PATH is tight once cargo's build-dir layout
/// nests artifacts under `build/<pkg>/<hash>/out/`, so keep this short.
fn temp_dir_prefix(source: &Utf8Path) -> String {
    const MAX_NAME: usize = 16;
    let name = source.file_name().unwrap_or("unnamed");
    let short: String = name.chars().take(MAX_NAME).collect();
    format!("mutants-{short}-")
}

Let me know if I missed something here! I have not tested this, only poked around briefly!

Originally posted by @plaidfinch in #636 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions