swiftlang / swift-foundation

The Foundation project
Apache License 2.0
2.41k stars 160 forks source link

Enable Predicate archiving for Linux #290

Open ser-0xff opened 1 year ago

ser-0xff commented 1 year ago

Hi! Some functionality (including Predicate encoding) is under FOUNDATION_FRAMEWORK condition which seems not enabled on Linux. What that FOUNDATION_FRAMEWORK semantically means, and is there any plans to give a possibility to encode predicates on Linux?

jmschonfeld commented 1 year ago

Hey! FOUNDATION_FRAMEWORK is a definition that we use to indicate portions of the code that are only included when building this source as part of the Foundation framework shipped on Apple OSes. Sometimes this is related to code that interacts with the Objective-C runtime, or other times it is related to code that supports tangential features that don't necessarily fit in this swift package in a cross-platform context.

In the case of Predicate archiving, this code is within the FOUNDATION_FRAMEWORK condition because it depends on a prototype of a set of Reflection APIs that we're working on but is not generally available yet. @Azoy has pitched the initial prototype on the swift forums, and we hope this feature of Predicate can help us understand what a great reflection API should look like in the future.

ser-0xff commented 1 year ago

Thank you for the reply!

ser-0xff commented 1 year ago

Is there any ideas on when Predicate archiving will be available on Linux? We would like to use predicates, we need to archive them on Linux, so need to decide now should we implement some working solution ourselves or wait while it will be available on Linux as well.

parkera commented 1 year ago

We're looking into what we can do here in the short term.

hassila commented 6 months ago

We are still definitely very interested in this, if there is any way we can help out to make this happen just let us know.

parkera commented 6 months ago

Understood - we're discussing some options.