apple / swift-foundation

The Foundation project
Apache License 2.0
2.27k stars 135 forks source link

Enable Predicate archiving for Linux #290

Open ser-0xff opened 8 months ago

ser-0xff commented 8 months 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 8 months 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 8 months ago

Thank you for the reply!

ser-0xff commented 8 months 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 8 months ago

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

hassila commented 1 month 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 1 month ago

Understood - we're discussing some options.