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

De-duplicate cargo watch diagnostics #1438

Closed
wants to merge 2 commits into from
Closed

De-duplicate cargo watch diagnostics #1438

wants to merge 2 commits into from

Commits on Jun 24, 2019

  1. De-duplicate cargo watch diagnostics

    When building multiple targets (e.g. debug and test) it's common for the
    shared code to emit a diagnostic for each target. This is due to
    rust-lang/cargo#1534 and its many duplicates.
    
    While this renders fine in the text view it can be confusing when
    looking at the error list or count.
    
    This adds an `areDiagnosticsEqual` helper and then only pushes the new
    diagnostic if we haven't seen it before. This doesn't do a full proper
    equality; it only looks at the parts of the diagnostic we set. I
    couldn't find an appropriate helper function in the VSCode API.
    etaoins committed Jun 24, 2019
    Configuration menu
    Copy the full SHA
    58c6573 View commit details
    Browse the repository at this point in the history
  2. Move areDiagnosticsEqual to local function

    This is consistent with `getLevel`
    etaoins committed Jun 24, 2019
    Configuration menu
    Copy the full SHA
    86abb97 View commit details
    Browse the repository at this point in the history