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

Upgrade dependencies (incl. Salsa) #553

Merged
merged 2 commits into from
Jul 7, 2020

Conversation

nathanwhit
Copy link
Member

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 the volatile attribute, so it might be good if someone who knows salsa a bit better double checked this.

Copy link
Contributor

@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.

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)

@@ -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]
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Member Author

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.

@nikomatsakis nikomatsakis merged commit e94a881 into rust-lang:master Jul 7, 2020
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.

3 participants