Skip to content

Node-ID-Based Error Deduplication #71

@0xGeorgii

Description

@0xGeorgii

Current implementation: String-based deduplication keys

fn push_error_dedup(&mut self, error: TypeCheckError) {
    let key = format!("UnknownType:{name}");
    // ...
}

It is better to migrate to ID-based deduplication for better performance and precision:

reported_errors: FxHashSet<(ErrorKind, u32)>  // (kind, node_id)

Benefits:

  • More efficient than string allocation
  • Distinguishes same name at different locations if needed
  • Aligns with rust-analyzer's approach

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions