Skip to content

compiletest: Not all diff installations have --color #80037

@camelid

Description

@camelid
Member

There is some rustdoc-related code in compiletest that uses the diff command-line tool; however, it passes the --color flag to diff, which diff does not accept on my system (macOS). We should probably use git diff --no-index instead of diff since it will have colors and will automatically use a pager. We may also want to pass the --minimal flag to diff/git diff; the manual page says:

--minimal
Spend extra time to make sure the smallest possible diff is produced.

See also #79991 (comment).

cc @jyn514

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
C-bugCategory: This is a bug.
on Dec 14, 2020
jyn514

jyn514 commented on Mar 24, 2021

@jyn514
Member

@camelid was this fixed by #82469 ?

notriddle

notriddle commented on Mar 25, 2021

@notriddle
Contributor
rust/src/tools/compiletest$ rg -- '--color'
src/main.rs
191:        Some(x) => panic!("argument for --color must be auto, always, or never, but found `{}`", x),

Yeah, it looks like it's fixed.

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

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @notriddle@jyn514@camelid

        Issue actions

          compiletest: Not all `diff` installations have `--color` · Issue #80037 · rust-lang/rust