Skip to content

Conversation

@ChayimFriedman2
Copy link
Contributor

To fix an unsoundness - #985.

There are two breaking changes here:

  1. Interned fields and interned function fields are required to be Update (or 'static)
  2. unsafe(non_update_return_types) in tracked fn options was renamed to unsafe(non_update_types) (and includes interned parameters as well now).

Fixes #985.

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 0f5be17
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/694117010f52e600071aa093

@ChayimFriedman2 ChayimFriedman2 marked this pull request as ready for review December 16, 2025 07:47
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 16, 2025

CodSpeed Performance Report

Merging #1036 will not alter performance

Comparing ChayimFriedman2:update-interned (0f5be17) with master (55e5e7d)

Summary

✅ 13 untouched

@MichaReiser
Copy link
Contributor

Does this fix #985

Can we add two non-compile tests:

  1. For an interned struct storing a reference
  2. For a multi-argument tracked query, taking a reference as the argument

@ChayimFriedman2
Copy link
Contributor Author

Does this fix #985

Yes.

Can we add two non-compile tests:

1. For an interned struct storing a reference

2. For a multi-argument tracked query, taking a reference as the argument

I added them as one, except storing a lifetime'd struct instead of a reference.

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thank you

To fix an unsoundness - salsa-rs#985.

There are two breaking changes here:

 1. Interned fields and interned function fields are required to be `Update` (or `'static`)
 2. `unsafe(non_update_return_types)` in tracked fn options was renamed to `unsafe(non_update_types)` (and includes interned parameters as well now).
@ChayimFriedman2
Copy link
Contributor Author

Addressed comments.

@MichaReiser MichaReiser added this pull request to the merge queue Dec 16, 2025
@MichaReiser MichaReiser added the bug Something isn't working label Dec 16, 2025
Merged via the queue into salsa-rs:master with commit 804e057 Dec 16, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Dec 16, 2025
@ChayimFriedman2
Copy link
Contributor Author

Can we get a release with this please? It's needed for rust-analyzer.

@ChayimFriedman2 ChayimFriedman2 deleted the update-interned branch December 16, 2025 08:46
ChayimFriedman2 added a commit to ChayimFriedman2/salsa that referenced this pull request Dec 16, 2025
ChayimFriedman2 added a commit to ChayimFriedman2/salsa that referenced this pull request Dec 16, 2025
ChayimFriedman2 added a commit to ChayimFriedman2/salsa that referenced this pull request Dec 16, 2025
This was referenced Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsoundness: Interned values can store references

3 participants