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

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

Closed
camelid opened this issue Dec 14, 2020 · 2 comments
Closed

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

camelid opened this issue Dec 14, 2020 · 2 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@camelid
Copy link
Member

camelid commented Dec 14, 2020

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

@camelid camelid added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Dec 14, 2020
@jyn514
Copy link
Member

jyn514 commented Mar 24, 2021

@camelid was this fixed by #82469 ?

@notriddle
Copy link
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.

@jyn514 jyn514 closed this as completed Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants