If there's anything between them, DocC doesn't recognize that the doc
comment belongs to the declaration that comes after the interruption,
resulting in that declaration being undocumented.
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.)
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.
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.
When building on Windows, we rely on the `withPlatformString` to convert
the strings to the native platform encoding (UTF-16). The public
`FilePath.withPlatformString` is marked as `@_alwaysEmitIntoClient` and
references the `_withPlatformString` which is marked as `internal`.
Annotate the function as `@usableFromInline` to enable the inlined
method to reference this function.
Scrap the separate module SystemInternals and instead have it be a
subdirectory. Adjust all access control accordingly. One day, when Swift gets
proper submodules or supermodules (i.e. resilience domains), we can reinstate
it. For now, a separate module makes binary distribution much more
complicated.
Fix bug in _modify and add better testing. Change lexicallyNormal to
lexicallyNormalized() to match "ed" rule.
Fix up some comments and remove some dead code
Co-authored-by: Kyle Macomber <kmacomber@apple.com>
This API is fully redundant with .kind == .regular and could be a source of
confusion and namespace pollution. Drop it for now, and we can add something
equivalent in the future when we have more component-analysis APIs.
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.