Commit Graph
14 Commits
Author SHA1 Message Date
Karoy Lorentey bb6ab43e44 Update availability declarations 2023-03-01 18:10:40 -08:00
Karoy Lorentey cc96d40bee Merge pull request #76 from apple/lorentey/post-back-ios15-system
Update package with changes from recent ABI stable releases
2023-02-28 16:13:44 -08:00
Alex Martini 2c2a831f66 Remove blank lines at the end of doc comments. 2023-01-31 12:35:33 -08:00
Karoy Lorentey e9886bf251 Merge branch 'main' into lorentey/post-back-ios15-system
# Conflicts:
#	Sources/System/FilePath/FilePathString.swift
2022-06-13 16:45:25 -07:00
Guillaume Lessard 3920df78d9 Correct deprecation messages 2022-06-03 16:43:25 -06:00
Guillaume Lessard afe2d35d0b Mitigate misuse of pointer conversion in FilePath inits 2022-06-03 16:43:25 -06:00
Karoy Lorentey 81d78be499 Fix Windows build 2021-12-26 21:53:28 -08:00
Karoy Lorentey c0e8ef346b Update package with changes from recent ABI stable releases
This brings the contents of this package up to date with versions of the ABI stable `System` module that shipped in recent iOS/macOS releases.

Most changes only touch internal implementation details, but some ABI-related fixes also affect the public API. There are no source-incompatible changes.

- ABI stability fixes (un-deprecate CModeT, don't use PlatformChar in inlinable contexts that need to deploy to iOS 14)
- New utilities: `_RawBuffer`, `Array<String>._withCStringArray`, `_withOptionalUnsafePointerOrNull`, `_withStackBuffer`, `system_memset`
- Prefer using explicit optionals to implicitly-unwrapped ones
- Add support for wildcard matching in mocking tests
- A bunch of new availability annotations. (I expect there will be more of these coming in future PRs.)
2021-12-21 17:50:21 -08:00
Karoy Lorentey 1daa0c9677 Unify availability annotations and synchronize them with macOS 12 / iOS 15
Availability annotations now follow a rigid syntax that mentions the swift-system version that introduced the entry point:

```
/*System 0.0.2, @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)*/
public func greeting() -> String {
  "Hello"
}
```

This is designed to be processed by automated source generation tools.
2021-12-20 17:10:59 -08:00
Michael Ilseman 578586ab80 Un-deprecate withCString
Un-deprecate withCString, but make sure it's not available on Windows (because
the types will not match). withPlatformString is still the preferred
expression of this and favors more portable code.
2021-05-10 13:32:31 -06:00
Michael Ilseman 8031239cef Emit withPlatformString as an availability workaround for open 2021-03-15 15:18:51 -06:00
Michael Ilseman 7b33caf850 Add commented out availability.
Add it for public APIs, though we will likely have to add it for internal
stuff too as a compiler workaround.
2021-02-25 21:11:15 -07:00
Michael Ilseman 2167575e66 Add FilePath Syntactic Operations API
Add the proposed non-file-system-interacting FilePath operations, Component,
Root, and ComponentView.

Proposal: https://forums.swift.org/t/api-review-filepath-syntactic-apis-version-2/44197

This change includes API/ABI additions and deprecations.
2021-02-01 08:42:44 -07:00
Michael Ilseman 920ef3085d Add PlatformString and Windows support
Add CInterop namespace and PlatformChar/PlatformEncoding typealiases for
narrow/wide characters.

Change Windows syscalls to use wide-character variants. Add full Windows root
parser to error-correct malformed roots and correctly normalize roots and
post-root portions of the path.

Add platformString APIs as replacements for cString APIs.

Add internal SystemString as backing storage type for FilePath.

Add Windows path mocking support.

This change includes API/ABI additions and deprecations.
2021-02-01 08:20:05 -07:00