You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Syntax] Workaround for 'cannot bypass resilience' warnings
`RawSyntaxArena` and `SyntaxDataaArena` have properties with types from
`_SwiftSyntaxCShims` which is `@_implementationOnly` when compiling with
'-enable-library-evolution`.
But for `-allow-non-resilient-access` for the package cross module
optimizations, they causes warnings:
```
warning: cannot bypass resilience due to member deserialization failure while attempting to access member 'mutex' of 'SyntaxDataArena' in module 'SwiftSyntax' from module 'SwiftSyntax'
warning: cannot bypass resilience due to member deserialization failure while attempting to access member 'hasParent' of 'RawSyntaxArena' in module 'SwiftSyntax' from module 'SwiftSyntax'
```
and non-resilient-access are disabled for these types.
To workaround that, use `UnsafeRawPointer` for those stored properties
and use casting methods to access the actual types.
Note the using computed properties were not enough to silience the
warnings.
0 commit comments