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

Add IngredientIndex to KeyStruct #591

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

puuuuh
Copy link
Contributor

@puuuuh puuuuh commented Oct 12, 2024

Closes #590

Copy link

netlify bot commented Oct 12, 2024

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 0744fd8
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/671108107bfef7000826e43e

src/active_query.rs Outdated Show resolved Hide resolved
Copy link
Member

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! Left some cleanup suggestions.

src/active_query.rs Outdated Show resolved Hide resolved
src/tracked_struct.rs Outdated Show resolved Hide resolved
src/tracked_struct.rs Outdated Show resolved Hide resolved
Copy link

codspeed-hq bot commented Oct 15, 2024

CodSpeed Performance Report

Merging #591 will not alter performance

Comparing puuuuh:typeid_mismatch_fix (0744fd8) with master (c6c51a0)

Summary

✅ 8 untouched benchmarks

@puuuuh puuuuh force-pushed the typeid_mismatch_fix branch 3 times, most recently from 4bcbfee to 47c318f Compare October 15, 2024 18:05
@puuuuh puuuuh force-pushed the typeid_mismatch_fix branch from 47c318f to acae02d Compare October 15, 2024 18:15
Copy link
Member

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'm still toying with the name. Thoughts?

/// allowing for multiple tracked structs with the same hash and ingredient_index
/// created within the query to each have a unique id.
#[derive(Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Copy, Clone)]
pub struct DisambiguationKey {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the naming of DisambiguationKey is not ideal, given e.g. KeyStruct. I'd like some names that make the relationship clearer. Here are some possibilities -- hopefully it's clear which is meant to be which in each case!

  • HashStruct and KeyStruct (close to today)
  • IdentityHash and Identity
  • IdentityHash and DisambiguatedIdentityHash
  • IngredientAndHash and DisambiguatorIngredientAndHash (just name it after the contents)

What do you think @puuuuh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IdentityHash and Identity is the best variant, imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also something like IdentityHash-StructCompoundId?

@nikomatsakis nikomatsakis added this pull request to the merge queue Oct 17, 2024
Merged via the queue into salsa-rs:master with commit 82f2a7d Oct 17, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Input change cause panic on next queries
3 participants