Skip to content

User control over cargo warnings #12235

Open
@epage

Description

@epage

Problem

Today, cargo maintainers are very cautious as to what warnings are created because they cannot be turned off by the user when they are intended. The problem is we've not had a mechanism to control it. With #12115, we'll now have a mechanism

Turning existing warnings into lints:

Porting clippy lints to cargo

Examples of new lints:

Proposed Solution

As package and workspace level lint control, turning existing warnings into diagnostics where possible

Tasks

Non-blocking

  • rustc-like diagnostics for parsing Cargo.lock
  • rustc-like diagnostics for parsing .cargo/config.toml
  • Deciding how to handle edition compatibility groups and groups in general (since refactor: Remove rust_2024_compatibility lint group #13740 skipped it for 2024)
    • Should we reuse rustc groups or not?
  • rustc-like diagnostics for processing Cargo.toml (ie port warnings off of shell.warn for consistency)
  • Diagnostic summary

Open questions

Notes

There will still be lints that are not related to the package but related to the user or / invocation. At a later stage, we can consider user-level lint levels.#

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-hardExperience: HardS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions