microsoft / microsoft/DiskANN

ANNError: Remove the old `log*` style constructors

Open
#1,003 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.9k
Forks
454
Avg merge
3d 22h
Merged PRs (30d)
35

Description

For future reference, you may want to prefer `ANNError::new(ANNErrorKind::IndexError, e)` instead of the old `log*` style constructors. The former defers any kind of string formatting until the entire error is formatter higher in the call stack, where-as the latter forces eager string evaluation lower in the callstack. Not that it matters *that* much though.

_Originally posted by @hildebrandmw in https://github.com/microsoft/DiskANN/pull/997#discussion_r3162385253_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for ANNError and the old log* constructors, then read the linked PR #997 discussion for context. Map the affected call sites before determining the scope; done means the old constructors and their uses are removed in favor of ANNError::new(...), with existing behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.