Guillaume Lessard
61e4ca4b81
Merge pull request #231 from apple/main
...
Merge main into release/1.5.0
1.5.0
2025-05-28 16:25:04 -07:00
Guillaume Lessard
f3154e33ec
Merge branch 'release/1.4.0' into release/1.5.0
2025-05-23 15:09:25 -07:00
Guillaume Lessard
99feed67fe
Merge pull request #225 from marcprux/main
...
Add Android imports to tests
2025-05-22 10:07:29 -07:00
Guillaume Lessard
40d22dace6
Merge pull request #230 from owenv/owenv/windows-release-path-parsing
...
Fix Windows path parsing when the package is built in release configuration
2025-05-22 09:48:39 -07:00
Owen Voorhees
595c862c19
Fix Windows path parsing when the package is built in release configuration
...
forceWindowsPaths can be used to force Windows path parsing both on and off.
Instead of defaulting it to false in release builds, we should not express any preference
2025-05-21 21:12:58 -07:00
Jake Petroules
5695a8831b
Transparently add the \\?\ prefix to Win32 calls for extended length path handling
...
On Windows, there is a built-in maximum path limitation of 260 characters under most conditions. This can be extended to 32767 characters under either of the following two conditions:
- Adding the longPathAware attribute to the executable's manifest AND enabling the LongPathsEnabled system-wide registry key or group policy.
- Ensuring fully qualified paths passed to Win32 APIs are prefixed with \\?\
Unfortunately, the former is not realistic for the Swift ecosystem, since it requires developers to have awareness of this specific Windows limitation, AND set longPathAware in their apps' manifest AND expect end users of those apps to change their system configuration.
Instead, this patch transparently prefixes all eligible paths in calls to Win32 APIs with the \\?\ prefix to allow them to work with paths longer than 260 characters without requiring the caller of System to manually prefix the paths.
See https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation for more info.
2025-04-23 14:52:03 -07:00
Guillaume Lessard
5691e92a4b
Merge pull request #227 from apple/enable-windows-ci
2025-04-19 09:59:09 -07:00
Jake Petroules
28ce835363
Enable Windows CI
...
FileOperationsTestWindows.testPermissions fails on Windows in a container environment with Hyper-V isolated containers; see https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/persistent-storage#permissions for some potentially-relevant information.
Skip it if we detect we're in a container.
Closes #223
2025-04-19 00:23:55 -07:00
Marc Prud'hommeaux
009b07e140
Add Android imports to tests
2025-03-13 08:59:59 -04:00
Karoy Lorentey
1b8167d354
Merge pull request #222 from apple/github-actions-support
...
[CI] Add support for GitHub Actions
2025-03-10 14:50:35 -07:00
Mishal Shah
2ac80d6f4e
Disable a few checks
2025-03-09 18:29:05 -07:00
Mishal Shah
d6b40a7284
[CI] Add support for GitHub Actions
2025-03-04 23:22:34 -08:00
Guillaume Lessard
a34201439c
Merge pull request #220 from glessard/1.4.2
...
[1.4.x] Support for FreeBSD and OpenBSD
1.4.2
2025-02-18 15:35:23 -08:00
Guillaume Lessard
12573bfb88
Merge branch 'main' into 1.4.2
2025-02-17 17:03:43 -08:00
Guillaume Lessard
3a1b4a8e05
Merge pull request #219 from glessard/1.4.1
...
[1.4.x] Use GetTempPathW for better compatibility
1.4.1
2025-02-17 14:04:33 -08:00
Guillaume Lessard
d9b03016dc
Merge pull request #218 from glessard/1.4.1
...
[1.4.x] Use GetTempPathW for better compatibility
2025-02-17 11:52:53 -08:00
xuty
f18ed75481
Use GetTempPathW for better compatibility
2025-02-17 11:43:11 -08:00
Guillaume Lessard
b1b7b60a55
Merge pull request #215 from 3405691582/openbsd
...
OpenBSD support.
2025-02-10 14:41:18 -08:00
Guillaume Lessard
2228d64644
Merge pull request #213 from Steelskin/fabrice/cmake-install-paths
...
[cmake] Install libraries in standard directories
2025-02-07 11:00:22 -08:00
3405691582
3b053e055b
ManagedBuffer.capacity is unavailable on OpenBSD.
...
`.capacity` is backed by malloc introspection (`malloc_size`), which is
not available on all platforms. The workaround is straightforward here,
thankfully: instead, use the minimum capacity already specified.
2025-02-04 19:44:35 -05:00
3405691582
90702d6d15
Typealias system_DIRPtr for OpenBSD.
2025-02-04 19:44:32 -05:00
Guillaume Lessard
849d005b2b
Merge pull request #211 from ShaftUI/temp-path-w
...
[Windows] Use GetTempPathW in _getTemporaryDirectory for better compatibility
2025-01-30 15:00:27 -08:00
Guillaume Lessard
8790e47013
Merge pull request #214 from michael-yuji/freebsd-wip
...
Add FreeBSD errno and open options
2025-01-29 15:50:13 -08:00
Guillaume Lessard
f27874d762
Merge pull request #209 from ADKaster/install-interface
...
CSystem: Set build and install interfaces on included headers
2025-01-28 13:49:12 -08:00
Michael Chiu
df7341ee2b
fix cmake x86_64 build
2025-01-26 21:29:19 -08:00
Michael Chiu
4d735a6631
Add FreeBSD errnos and open options
2025-01-26 21:29:13 -08:00
Fabrice de Gans
bebd7c146e
[cmake] Install libraries in standard directories
...
Previously, libs were installed under `lib/swift/${os}`. They should be
installed in the default library directory for the relevant target
system.
In addition, swiftmodules were installed in the older layout format.
This changes to use the standard modern layout format for swiftmodules.
2025-01-23 11:45:17 -08:00
michael-yuji
4fa2a719c5
Merge pull request #212 from michael-yuji/freebsd-wip
...
Guard errnos not available on FreeBSD
2025-01-17 21:52:07 -08:00
Michael Chiu
0d824eee86
refactor ifdef in test
2025-01-17 15:06:28 -08:00
Michael Chiu
eb566de2d3
Fix tests on FreeBSD
2025-01-17 14:43:40 -08:00
Michael Chiu
a4fb6cb206
Keep order consistent
2025-01-17 14:43:34 -08:00
Michael Chiu
7e73a336fb
Guard errnos not available on FreeBSD
2025-01-17 14:30:51 -08:00
xuty
85b83fddb1
Use GetTempPathW for better compatibility
2024-12-17 15:13:15 +08:00
Guillaume Lessard
61a2af5e8b
Merge pull request #210 from ADKaster/remove-nbsp
...
Internals: Remove non-breaking spaces from Windows syscall adapter
2024-11-22 19:38:54 -05:00
Andrew Kaster
eb3b1fa54b
Internals: Remove non-breaking spaces from Windows syscall adapter
...
This was causing a warning with Swift 6.0.2
2024-11-21 15:03:28 -07:00
Andrew Kaster
f1393b76f3
CSystem: Set build and install interfaces on included headers
2024-11-21 14:48:57 -07:00
Guillaume Lessard
fbd61a676d
Merge pull request #207 from glessard/merge-1.4.0-into-main
...
Merge 1.4.0 into main
2024-10-18 22:39:45 -07:00
Guillaume Lessard
f21f6a8866
Merge branch 'release/1.4.0' into merge-1.4.0-into-main
...
# 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/FileOperations.swift
# Sources/System/FilePath/FilePath.swift
# Sources/System/Internals/WindowsSyscallAdapters.swift
2024-10-17 17:24:38 -07:00
Guillaume Lessard
c8a44d836f
Merge pull request #206 from glessard/1.4.0-readme
...
[1.4.0] Updates to the README file
1.4.0
2024-10-17 16:12:10 -07:00
Guillaume Lessard
b80d743dab
Update README.md
2024-10-17 15:52:41 -07:00
Guillaume Lessard
eeeb81d0cd
[readme] update usage example, reword stability
2024-10-17 15:14:38 -07:00
Guillaume Lessard
234e15320e
Merge pull request #204 from glessard/1.4.0-ci-adjustment
...
[1.4.0] Swift 5.8 is not supported on this branch
2024-10-17 15:01:46 -07:00
Guillaume Lessard
154cbf7c95
Merge pull request #205 from glessard/1.4.0-pipe-correction
...
[windows] expose pipe’s buffer size parameter
2024-10-17 14:57:49 -07:00
Guillaume Lessard
3f4e7cb45c
[windows] expose pipe’s buffer size parameter
2024-10-17 14:31:37 -07:00
Guillaume Lessard
11d481252d
[1.4.0] Updates to the README file
2024-10-17 13:17:08 -07:00
Guillaume Lessard
2e8f58ac41
[1.4.0] Swift 5.8 is not supported on this branch
2024-10-17 08:49:29 -07:00
Guillaume Lessard
5cd7eade6d
Merge pull request #203 from glessard/systemstring-tweaks-1.4.0
...
[1.4.0] SystemString consistency improvements
2024-10-16 23:25:29 -07:00
Guillaume Lessard
b2d4917ebe
Update copyright notices
2024-10-16 23:09:09 -07:00
Guillaume Lessard
d96435c72b
Rename withSystemChars
...
- `withNullTerminatedSystemChars` makes it clear that the null-termination is included. Operations where the null-termination is included should be obvious.
2024-10-16 23:09:09 -07:00
Guillaume Lessard
95784d018f
Fix behaviour of withCodeUnits()
...
- The original implementation includes a trailing zero with the full collection, but the implementation for a slice does not. As a result, given a `let s: SystemString`, `s.string` was not equal to `s[…].string`
2024-10-16 23:09:09 -07:00