apple / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.23k stars 1.12k forks source link

[wasm] Define `_WASI_EMULATED_MMAN` to replace imports #4913

Closed kateinoigakukun closed 4 months ago

kateinoigakukun commented 4 months ago

The wasi_emulated_mman module must be imported with @_implementationOnly to avoid requiring Foundation users to enable _WASI_EMULATED_MMAN by themselves. "private import" does not work here because it still imports private dependencies while building a module that import Foundation.

kateinoigakukun commented 4 months ago

@swift-ci test

MaxDesiatov commented 4 months ago

IIUC @_implementationOnly should not be used for non-resilient libraries, so maybe we can find some other workaround for this? I hope @xymus can clarify what options we have here.

kateinoigakukun commented 4 months ago

@MaxDesiatov Updated not to use @_implementationOnly here. See commit message for the rationale https://github.com/apple/swift-corelibs-foundation/pull/4913/commits/90c183256e2f579027dcb873e48c06c9e74d794b

kateinoigakukun commented 4 months ago

@swift-ci test

MaxDesiatov commented 4 months ago

@swift-ci test windows