Revert Ref.read Ref.write to untracked because they're shared between IO and Scope interfaces. #5474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
When adding the new Ref instructions I had incidentally changed
Ref.read
andRef.write
from Untracked -> Tracked;This caused tests in base to fail because they're triggering sandboxed IO detection.
In theory operations on
Ref IO
should be tracked and onRef Scope
should be untracked, but since they both use the same builtins underneath that's not currently possible.This PR reverts the tracking to this state:
Which seems a bit strange, but is the most conservative we can make it at the moment.
It's notable that
readForCas
,Ticket.read
andRef.cas
only apply to IO refs anyways,but weirdlyTicket.read
doesn't actually have IO in its type even though it uses IO in the runtime implementation and is marked as Tracked.The logic for now is just to revert it to what we had before 🤷🏼
Implementation notes
Swap the tracking back to its previous state
Test coverage