Skip to content

Rename dep node "fingerprints" to distinguish key and value hashes#152751

Open
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Zalathar:fingerprint
Open

Rename dep node "fingerprints" to distinguish key and value hashes#152751
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Zalathar:fingerprint

Conversation

@Zalathar
Copy link
Member

In the query system's dependency graph, each node is associated with two fingerprints: one that is typically a hash of the query key, and one that is typically a hash of the query's return value when called with that key.

Unfortunately, many identifiers and comments fail to clearly distinguish between these two kinds of fingerprint, which have very different roles in dependency tracking. This is a frequent source of confusion.

This PR therefore tries to establish a clear distinction between:

  • Key fingerprints that help to uniquely identify a node (along with its DepKind), and are typically a hash of the query key
  • Value fingerprints that help to determine whether a node can be marked green (despite having red dependencies), and are typically a hash of the query value

There should be no change to compiler behaviour.

r? nnethercote (or compiler)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 17, 2026
@Zalathar
Copy link
Member Author

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 17, 2026

☔ The latest upstream changes (presumably #152755) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants