Files
swift-mirror/test/Concurrency/Inputs/normalize_sil_uuids.py
Aviva Ruben 019ddea691 Implement file-level isolation default
Leans on the previous refactor to apply file-level default isolation
via isolation inference. Follows the 'final' version of 478, so top
level globals are included in file-level default isolation. Adds
`effectivelyExplicit` method, to be used instead of checking for the
Explicit enum value directly, since a file-level default isolation
should be treated as effectively default for free un/adopt (the
non-explicit form would be unintuitive to express without the module
feature flag). This commit will diagnose @available or @diagnose until
the next commit...

Note that computeActorIsolation needs to be updated to accept isolation
on file-scope global stored properties, the old check was too broad,
and in (i think?) trying to reject isolation on computed properties of
types, also rejected it on top-level code.
2026-06-22 13:31:20 -07:00

13 lines
311 B
Python

"""Normalize SIL output for stable diffs.
Opened-existential archetypes carry a per-compilation UUID that would prevent
diffing SIL. Replace each archetype's UUID with a placeholder before diff.
"""
import re
import sys
sys.stdout.write(
re.sub(r'@opened\("[^"]+"', '@opened("UUID"', sys.stdin.read())
)