-
Notifications
You must be signed in to change notification settings - Fork 182
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
Upgrade dependencies (incl. Salsa) #553
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems generally good, but I don't think the salsa change will quite work. I'm not sure the best fix -- maybe patch salsa -- or maybe some hacky thing here for now (e.g., a type that implements Eq
but just using Arc::ptr_eq
)
chalk-integration/src/query.rs
Outdated
@@ -50,7 +51,7 @@ pub trait LoweringDatabase: RustIrDatabase<ChalkIr> { | |||
/// cached state becomes invalid, so the query is marked as | |||
/// volatile, thus ensuring that the solver is recreated in every | |||
/// revision (i.e., each time source program changes). | |||
#[salsa::volatile] | |||
#[salsa::dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't know that this has quite the same semantics. I think this is going to create a fresh solver every time. This was an issue that was raised over on the salsa repo -- that we lost a way to have values that are not Eq
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is there a way to work around this, or are we stuck waiting for a solution to the salsa issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't know that this has quite the same semantics. I think this is going to create a fresh solver every time. This was an issue that was raised over on the salsa repo -- that we lost a way to have values that are not
Eq
.
Ah yes, you're right. I was hoping they had the same semantics going off their descriptions, but looking at the source code they definitely aren't the same.
So is there a way to work around this, or are we stuck waiting for a solution to the salsa issue?
We could use a hacky workaround (which @nikomatsakis briefly alluded to). I just pushed some changes that should work, but it's not ideal.
This PR upgrades all dependencies, including upgrading salsa to
0.14
. To upgrade salsa, there were some changes needed to account for the removal of thevolatile
attribute, so it might be good if someone who knows salsa a bit better double checked this.