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

cargo check duplicated info #9005

Closed
GopherJ opened this issue Dec 21, 2020 · 4 comments
Closed

cargo check duplicated info #9005

GopherJ opened this issue Dec 21, 2020 · 4 comments
Labels
C-bug Category: bug

Comments

@GopherJ
Copy link

GopherJ commented Dec 21, 2020

Problem
after upgrading to latest rustc 1.50.0-nightly (eb4fc71dc 2020-12-17), I start to get duplicated warnings

Steps

use std::fs::File;
fn main() {
    println!("Hello, world!");
}
  1. set alias alias ck='cargo check --all-targets'
  2. run ck

image

Possible Solution(s)

Notes

Output of cargo version: cargo 1.50.0-nightly (d274fcf86 2020-12-07)

@GopherJ GopherJ added the C-bug Category: bug label Dec 21, 2020
@GopherJ
Copy link
Author

GopherJ commented Dec 21, 2020

This error happens on the first cargo check, it disappears since the second run of cargo check

@ehuss
Copy link
Contributor

ehuss commented Dec 21, 2020

Hm, I'm having a hard time trying to figure out how to reproduce this. Is this easily reproducible for you? Did you maybe use other flags like --all-targets? Can you show the whole output of cargo check -v after running cargo clean?

@GopherJ
Copy link
Author

GopherJ commented Dec 21, 2020

@ehuss yes I'm using --all-targets, thanks for reminding me if this

image

alias
image

@ehuss
Copy link
Contributor

ehuss commented Dec 21, 2020

Ah, in that case I'll close as a duplicate of #5128. When you check multiple targets, some code gets checked multiple times (for example, the library gets checked as a normal library, and checked separately with the --test flag to check unit tests). That fundamentally can't be avoided, but I do intend to add some kind of message deduplication logic to Cargo.

@ehuss ehuss closed this as completed Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants