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

Freeze records on insert/remove/update. #2131

Merged
merged 3 commits into from
Dec 24, 2024
Merged

Freeze records on insert/remove/update. #2131

merged 3 commits into from
Dec 24, 2024

Conversation

jneem
Copy link
Member

@jneem jneem commented Dec 23, 2024

This finishes off #1877, I think.

I didn't do freezing for map, because I couldn't find an example where it made a difference. Did I miss something?

@jneem jneem requested a review from yannham December 23, 2024 16:00
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

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

map doesn't need freezing indeed (or, put differently, it's already been freezing its argument in practice, even if we didn't formulate it that way, because map needs to flush all pending lazy contracts or the result is quite quickly entirely wrong).

I initially delayed this follow-up in order to give a bit of thinking around the idea of having dictionary records freezing their argument (#2113 (comment)). That being said, I think this PR is forward-compatible with this idea, shall we execute, as all those functions have a dictionary type in their signature (we would just revert the manual freezing that you just introduced). It's fine for now, as it fixes the original misbehavior and also unblocks you on the stdlib testing, I suppose.

@jneem
Copy link
Member Author

jneem commented Dec 24, 2024

I like the idea of a sharper distinction between records and dictionaries. But yes, I'd like this to go in before we figure that out 😄

@jneem jneem added this pull request to the merge queue Dec 24, 2024
Merged via the queue into master with commit 77e355a Dec 24, 2024
5 checks passed
@jneem jneem deleted the freeze-em branch December 24, 2024 02:17
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.

2 participants