When I stubbed in support for any I put in a comparator in TypeSpec. This creates a couple issues.
The first is that when I reflect on a module using the .swiftinterface file, I will get any tags that I hadn't put in the original code. There's added by the swift compiler as a 'service'. If I'm looking for a wrapper function that I wrote, the original won't have any.
Second, when I import functions the .dylib file, there are no any tags in the mangled signature.
My choices here are to:
Add any tags when I write functions (possible, but tricky to get right in all cases, especially generics or tuples that are nested: Foo<Bar<Baz<any SomeProtocol>>> and to add any tags toSwiftType` used from .dylib files (tricky for the same reasons)
Make comparisons ignoring Any (expedient)
Since I don't see any particular downside to 2, I went with that.
When I stubbed in support for
any
I put in a comparator inTypeSpec
. This creates a couple issues. The first is that when I reflect on a module using the .swiftinterface file, I will getany
tags that I hadn't put in the original code. There's added by the swift compiler as a 'service'. If I'm looking for a wrapper function that I wrote, the original won't haveany
. Second, when I import functions the .dylib file, there are noany
tags in the mangled signature.My choices here are to:
Foo<Bar<Baz<any SomeProtocol>>> and to add any tags to
SwiftType` used from .dylib files (tricky for the same reasons)Any
(expedient)Since I don't see any particular downside to 2, I went with that.