Skip to content

bootstrap printing failing command contains non-shell escape sequences #158749

Description

@Mark-Simulacrum

With #158073 (I think?), we now run Cargo with CARGO_ENCODED_RUSTFLAGS, which means that we render commands containing the \u{1f} (Rust) escape sequence, e.g., this snippet:

CARGO_ENCODED_RUSTDOCFLAGS="--cfg=windows_raw_dylib\u{1f}-Csymbol-mangling-version=v0\u{1f}-Zannotate-moves\u{1f}

At least in my local shells (bash and zsh), \u{1f} is not a valid escape sequence inside strings, so this ends up breaking copy/pasting the command.

I'm not sure if there's a good, relatively universal, way to represent such escape sequences in the debug logging, but the output above is definitely not it. One of the easier options may be that we should not resort to the encoded form of the variable unless we detect actual spaces are present in any of the arguments...

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions