13 Commits

Author SHA1 Message Date
Johannes Weiss
601e847faa
always @preconcurrency import Glibc (#1175)
Co-authored-by: Johannes Weiss <johannes@jweiss.io>
2025-03-04 09:25:51 -08:00
Jeremy Schonfeld
e555c629ba
Fix Windows symlink handling in FileManager APIs (#858)
* Fix Windows symlink handling in FileManager APIs

* Address feedback
2024-08-16 10:41:44 -07:00
finagolfin
c15a5e1f5c
[Android] Use the Bionic module in more places (#842)
Also, use `canImport()` wherever importing APIs, reserving `os(Android)` for
platform differences.
2024-08-15 14:34:15 -07:00
Evan Wilde
aecc1b158c
[main] Get Swift-Foundation building against MUSL for Swift Static SDK (#848)
* Get FoundationEssentials building

Adding the missing musl imports to get FoundationEssentials building for
the Swift static SDKs again.

Also providing an option to disable building the macros. The macros
aren't necessary for building the library and will not be run as part of
the static SDK. No need to bloat the SDK or build times further. For
Swift 6, the macros should be provided by the toolchain since the
toolchain and SDK are current revlocked due to swiftmodules.

* Get FoundationInternationalization building

Adding the missing Musl imports to get FoundationInternationalization
building for the static SDK.
2024-08-14 13:34:15 -07:00
Alex Lorenz
ad6ca71b4e
[android] fix the LP32 armv7/i686 android build (#846)
* [android] fix the LP32 armv7/i686 android build

* Update Sources/FoundationEssentials/Android+Extensions.swift

Co-authored-by: Jeremy Schonfeld <1004103+jmschonfeld@users.noreply.github.com>

* drop the android Lp32 specific operator &

---------

Co-authored-by: Jeremy Schonfeld <1004103+jmschonfeld@users.noreply.github.com>
2024-08-14 10:56:25 -07:00
Yuta Saito
c82d1673eb
Add WASI platform conditions for libc imports and word size (#776)
* Add `import WASILibc` statements to libc import chains

* Declare wasm32 arch as 32-bit environment

* Switch to _pointerBitWidth for architecture checks

This change switches the architecture checks in Data.swift to use the
_pointerBitWidth instead of the arch() checks for consistency with newer
platforms.
2024-08-02 09:55:56 -07:00
Jeremy Schonfeld
3f646c2a5e
Remove unneccessary _FileManagerImpl.delegate (#801) 2024-07-31 17:00:58 -07:00
Saleem Abdulrasool
a7692238a8
FoundationEssentials: initial pass to add Android support (#704)
This adds the necessary guards and includes for the Android modules.
While the module does not compile currently due to nullability
differences (and in some cases missing declarations), this at least
brings the module to a point where we can start working on the errors
and differences to create a maintainable codebase for Android.
2024-06-26 16:00:37 -07:00
Saleem Abdulrasool
1d8050cf8e
FoundationEssentials: handle directory diff properly (#666)
We need to use `FILE_FLAG_BACKUP_SEMANTICS` to ensure that we are able
to diff directories as well. Previously we would mishandle this case and
was caught by the test suite.

Thanks to Jeremy Day for helping resolve this!
2024-06-06 16:42:26 -07:00
Saleem Abdulrasool
6c151ca765
FoundationEssentials: implement file diffing support for Windows (#548)
* FoundationEssentials: repair the Windows build after tweaks

The changes to repair the macOS/Linux build adversely impacted the
Windows build. Accommodate the API and logic changes for Windows.

* FoundationEssentials: implement file diffing support for Windows

Windows does not have the same Unix file system APIs (e.g. FTS).
Implement a platform specific implementation to compare files on
Windows.
2024-04-30 10:38:31 -07:00
Saleem Abdulrasool
700fb4324d
FoundationEssentials: squelch some warnings (#525)
When trying to revive the Windows port, these warnings clutter the
current set of things to resolve still. Silence the warnings by
explicitly ignoring the results.
2024-04-03 13:14:12 -07:00
Saleem Abdulrasool
9491cce69c
FoundationEssentials: add some missing imports for Windows (#520)
This allows us to get further into building FoundationEssentials once
again on Windows. Much of the file system work has resulted in this
module no longer being viable on Windows and will need to be replaced to
allow building on Windows which does not have the `fts` APIs.
2024-03-29 14:19:23 -07:00
Jeremy Schonfeld
33856a556d
(120741818) Port FileManager to swift-foundation
* (120741818) Port FileManager to swift-foundation

* (120741818) Fix linux test failures

* (120741818) Fix build failures
2024-02-09 15:03:43 -08:00