Guillaume Lessard
69eee996ac
Merge pull request #202 from glessard/platform-support-1.4.0
...
[1.4.0] cherry-pick platform support changes
2024-10-16 18:29:59 -07:00
Finagolfin
209dfeacb8
Import new Android overlay
...
Use Bionic module instead where possible
2024-10-16 18:22:35 -07:00
Finagolfin
b2b60a6b94
Android: DIR* is an OpaquePointer in Bionic too
2024-10-16 18:22:19 -07:00
Max Desiatov
e11703d915
Add support for WASILibc module ( #159 )
...
Quoting the [wasi.dev landing page](https://wasi.dev ):
> The WebAssembly System Interface (WASI) is a group of standard API specifications for software compiled to the W3C WebAssembly (Wasm) standard. WASI is designed to provide a secure standard interface for applications that can be compiled to Wasm from any language, and that may run anywhere—from browsers to clouds to embedded devices.
Currently support for WASI in Swift is based on [`wasi-libc`](https://github.com/WebAssembly/wasi-libc ).
Adding support for `wasi-libc` mostly amounted to excluding unsupported errnos, adding TLS dictionary storage shim for single-threaded environment, and adding constants in C headers for macros that Clang importer currently doesn't support.
Co-authored-by: Guillaume Lessard <guillaume.lessard@apple.com >
# Conflicts:
# Sources/System/FileOperations.swift
# Sources/System/Internals/Syscalls.swift
2024-10-16 18:22:19 -07:00
Guillaume Lessard
938fda53e2
Merge pull request #200 from glessard/private-aeic-init-removal-1.4.0
...
[1.4.0] backport #191
2024-10-16 17:41:50 -07:00
Guillaume Lessard
e7ffa45882
Remove private-and-@_aEIC initializers
...
These were just passthroughs.
2024-10-16 17:38:24 -07:00
Guillaume Lessard
607542a559
Merge pull request #198 from glessard/1.4.0-backport-158&176
2024-10-16 17:28:28 -07:00
Guillaume Lessard
b9e4d2b2ba
Remove more accidentally public functions
2024-10-16 17:03:59 -07:00
Guillaume Lessard
473b493ab0
Merge pull request #199 from glessard/1.4.0-backport-193
...
Add support for macCatalyst
2024-10-16 14:15:25 -07:00
George Barnett
9eb1f34cbf
Add support for macCatalyst
...
Building swift-system for macCatalyst fails as there is no import of the
Darwin module.
# Conflicts:
# Package.swift
2024-10-16 14:00:47 -07:00
Alastair Houghton
6c64372b85
[Windows] Add a comment to explain the O_RDONLY/O_WRONLY/O_RDWR logic.
...
The values of these flags on Windows do not overlap, and more
particularly, `O_RDONLY` is actually zero on Windows, which means we
cannot test for it by AND-ing.
2024-10-14 16:01:01 -07:00
Alastair Houghton
3a4e2f8071
[Windows] Fix tests.
...
We need to use `@testable` when importing `SystemPackage` in order to
let us test the `internal` functions.
Also, use `NUL` instead of `/dev/null`, and generate random bytes in a
file instead of reading from `/dev/random`.
2024-10-14 16:01:01 -07:00
Alastair Houghton
53471ce33b
[Windows] Fix a problem with opening files read only.
...
`_O_RDONLY` is zero, so we can't test for it by AND-ing.
2024-10-14 16:01:01 -07:00
Alastair Houghton
f1d7eb52c6
Remove accidentally public functions.
...
These can't be new API as they haven't been reviewed.
2024-10-14 16:01:01 -07:00
Alastair Houghton
cf7530848e
[Linux] Glibc's DIR doesn't get imported into Swift.
...
Swift ends up with OpaquePointer instead of a typed pointer.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
5ae5d5a3af
Refactor FilePathTemp, add tests for permission code.
...
Broke `FilePathTemp.swift` into separate files for POSIX and
Windows.
Added tests for permissions code on Windows.
Added leading underscores to some function names.
Made some other functions `fileprivate`.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton and Karoy Lorentey
bcc7f6d569
Update Sources/System/FilePath/FilePathTemp.swift
...
Co-authored-by: Karoy Lorentey <klorentey@apple.com >
2024-10-14 15:59:36 -07:00
Alastair Houghton
e293300430
Map mode bits to Windows ACLs.
...
This adds support for mapping POSIX-style mode bits to Windows ACLs when
calling `open()` or `mkdir()`.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
4cafcc96f6
Changes after comments from Saleem.
...
Use idiomatic Swift notation, not `Optional<Bool>`.
Prefer Win32 APIs to UCRT APIs.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
85de4e51e2
Use the proper temporary directory on Darwin.
...
It seems we can get the temporary directory from confstr().
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
d4e2b09c37
Fix swift-system to work on Windows.
...
The swift-system tests were not passing, for various reasons, mostly
to do with path related confusion.
As part of this, add a function to create a temporary directory, as that
was one of the problems.
Also add Windows support for pipe() and ftruncate(), which was missing.
rdar://125087707
2024-10-14 15:59:36 -07:00
Guillaume Lessard
5ea5b2e89a
Merge pull request #197 from lorentey/merge-1.3.0→1.4.0
...
Merge release/1.3.0 to release/1.4.0
2024-10-14 11:02:40 -07:00
Karoy Lorentey
8564f96d1f
Merge branch 'release/1.3.0' into release/1.4.0
...
# Conflicts:
# .gitignore
# .swiftci/5_10_ubuntu2204
# .swiftci/5_8_ubuntu2204
# .swiftci/5_9_ubuntu2204
# .swiftci/nightly_6_0_macos
# .swiftci/nightly_6_0_ubuntu2204
# .swiftci/nightly_main_macos
# .swiftci/nightly_main_ubuntu2204
# .swiftci/nightly_main_windows
# Package.swift
# Sources/System/FilePath/FilePath.swift
# Sources/System/Internals/CInterop.swift
2024-09-19 16:50:34 -07:00
Karoy Lorentey
b85a788897
Merge pull request #196 from lorentey/metadata-updates
...
[1.4] Metadata updates
2024-09-19 15:31:34 -07:00
Karoy Lorentey
88a60e08b3
Update README
...
- Clarify swift-system’s stance on cross-platform abstractions. Stop using the term “multi-platform”.
- Expand source stability section.
- Add a section on our branching strategy.
- Link to the Code of Conduct document.
2024-09-19 13:01:48 -07:00
Karoy Lorentey
4c612a1e29
Bump required toolchain version to 5.9. Sanitize Package manifest
...
- Don’t define _CRT_SECURE_NO_WARNINGS outside Windows
- Let all targets share the same settings
2024-09-19 12:57:57 -07:00
Karoy Lorentey
603c451818
Add code of conduct
2024-09-19 12:49:08 -07:00
Guillaume Lessard
d2ba781702
Merge pull request #190 from glessard/enforce-file-path-invariants-in-decode-1.3.x
...
Cherry-pick: ensure invariants are enforced when decoding
1.3.2
2024-07-23 12:42:13 -07:00
Stephen Canon
a1f77d0e1a
Cherry-pick: ensure invariants are enforced when decoding
...
Ensure that FilePath and SystemString's invariants are enforced when decoding.
Cherry-pick of merge-commit 9c42c54644
from PR #189
# Conflicts:
# Sources/System/FilePath/FilePath.swift
2024-07-23 11:26:26 -07:00
Guillaume Lessard
6a9e38e7bd
Merge pull request #185 from glessard/disfavoredOverload-1.3.0
...
[1.3.x] Disfavor String.init(platformString: UnsafePointer<CChar>)
1.3.1
2024-06-07 17:43:21 -07:00
Yuta Saito
848a927122
Merge pull request #184 from kateinoigakukun/katei/suppress-cmakelists-warning-1.4
...
[1.4] Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-07 11:46:19 +09:00
Guillaume Lessard
2b30f8820c
Merge pull request #183 from kateinoigakukun/katei/suppress-cmakelists-warning-1.3
...
[1.3] Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-06 13:44:13 -07:00
Yuta Saito
1a8d472f35
Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-05 18:06:54 +00:00
Yuta Saito
f9d6b48027
Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-05 18:05:57 +00:00
Karoy Lorentey
d82bccbb17
Merge pull request #164 from lorentey/retarget-to-1.4.0
...
Retarget pending changes to 1.4.0
2024-06-05 09:15:44 -07:00
Karoy Lorentey
f9266c8518
Merge pull request #177 from lorentey/fix-cmake
...
[1.3][CMake] Restore to working order on Apple platforms
1.3.0
2024-05-15 14:48:03 -07:00
Karoy Lorentey
b7dc8e8e41
[CMake] Restore to working order on Apple platforms
2024-05-15 14:30:14 -07:00
Guillaume Lessard
7d45e0dd46
Update README.md to refer to 1.3.0
2024-05-12 11:40:14 -07:00
Karoy Lorentey
62e62b3a7c
Add CODEOWNERS
2024-05-10 17:10:08 -07:00
Guillaume Lessard
ab09f04cfe
Merge pull request #173 from lorentey/codeowners-1.3.0
...
Add CODEOWNERS
2024-05-10 17:07:55 -07:00
Karoy Lorentey
0cf079efea
Add CODEOWNERS
2024-05-10 17:05:37 -07:00
Mishal Shah
52f603c6b3
[CI] Remove support for Swift 5.7
2024-05-10 16:31:46 -07:00
Mishal Shah
d18980c960
[CI] Remove support for Swift 5.7
2024-05-10 16:30:41 -07:00
Mishal Shah
08800445eb
Add support for Swift CI on release/1.4.0
2024-05-10 16:27:47 -07:00
Guillaume Lessard
de1f8bce5e
Merge pull request #172 from glessard/visionOS-support-for-1.3.0
...
[1.3.0] visionOS support for 1.3.0
2024-05-10 16:23:53 -07:00
Mishal Shah
0368ce547b
Add support for Swift CI on release/1.3.0
2024-05-10 16:18:08 -07:00
Guillaume Lessard
7b14e48d0d
Remove the repeated list of Darwin-based platforms
...
Replaced with a constant defined in the package manifest.
2024-05-10 16:09:22 -07:00
Guillaume Lessard
c456f4186e
Change the package manifest to support visionOS
2024-05-10 16:02:32 -07:00
Karoy Lorentey
ec395a7aa2
Merge pull request #171 from lorentey/require-5.8
...
[1.3.0] Require Swift 5.8
2024-05-10 15:59:40 -07:00
Karoy Lorentey
f1f59e148f
Update gitignore
2024-05-10 15:55:04 -07:00