Commit Graph
44 Commits
Author SHA1 Message Date
Karoy Lorentey b9d290dc1e Add missing @_implementationOnly attribute 2021-02-25 21:14:46 -07:00
Michael Ilseman 0734450867 Fixup compilation failures for some compilers 2021-02-25 21:14:46 -07:00
Michael Ilseman d7611ca8ad Internalize SystemInternals
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.
2021-02-25 21:14:46 -07:00
Michael Ilseman b63554656d [gardening] Privatization of Mocking 2021-02-25 21:14:44 -07: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 4f0eafd24e Ease binary distribution: testing
Add a SYSTEM_PACKAGE define and conditionalize import statements in tests to
ease testing of binary distributions of System.
2021-02-25 21:11:15 -07:00
Michael Ilseman 37e23f208a Merge pull request #28 from lorentey/whoop-de-dup
Add support for dup/dup2
2021-02-24 18:40:40 -07:00
Karoy Lorentey 2d24a58a41 Add support for dup/dup2 2021-02-24 13:30:07 -08:00
Michael Ilseman a5b2501f9a Merge pull request #27 from milseman/issue_26
[test] Add a test for issue-26
2021-02-24 08:25:15 -07:00
Michael Ilseman b5a89a4601 [test] Add a test for issue-26 2021-02-21 09:49:16 -07:00
Michael Ilseman 2e9c1a7118 Merge pull request #24 from milseman/fatal_assertion
Fix release builds by making assert into fatalError
2021-02-08 09:22:46 -07:00
Michael Ilseman 03c0b7ada5 Fix release builds by making assert into fatalError 2021-02-08 09:21:35 -07:00
Michael Ilseman 90d412b6f3 Merge pull request #19 from prabal4546/main
Update README.md
2021-02-06 09:16:05 -07:00
Michael Ilseman 47da6f147f Merge pull request #21 from lorentey/standard-fds
Add symbolic names for standard file descriptors
2021-02-05 22:58:42 -07:00
Karoy Lorentey 2904f9ead3 Add symbolic names for standard file descriptors 2021-02-05 19:35:18 -08:00
Prabaljit Walia 11cc26a46b Update README.md 2021-02-05 13:05:23 +05:30
Prabaljit Walia ac6f82162c Update README.md 2021-02-05 13:04:16 +05:30
Michael Ilseman 5bea53afe7 Merge pull request #14 from milseman/route_morphology
FilePath syntactic operations
2021-02-04 17:12:32 -07:00
Michael IlsemanandKyle Macomber d24083e1be Integrate API review
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>
2021-02-04 16:34:20 -07:00
Michael Ilseman 05e3d04b0c Drop Component.isSpecialDirectory
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.
2021-02-02 07:49:42 -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
Michael Ilseman 79eed1f99d Enforce at construction/mutation that FilePath's separators are normalized 2020-11-13 17:28:05 -08:00
Michael Ilseman 3367b485e1 Follow test convention of expected as first parameter 2020-11-13 17:00:33 -08:00
Michael Ilseman 5d1b2fb985 Folders for FilePath and Platform sources 2020-11-13 16:57:25 -08:00
Michael Ilseman 0627d28e6a Merge pull request #6 from compnerd/windows
Initial port to Windows
2020-11-04 09:27:21 -08:00
Saleem Abdulrasool 4ffcc62e9b Initial port to Windows
This adds enough shims and tweaks the types sufficiently to allow
building System on Windows.
2020-11-03 15:03:51 -08:00
Michael Ilseman 0b0d9d5fbb Merge pull request #12 from compnerd/compile
Follow up to #11 to repair the build
2020-10-25 15:21:33 -07:00
Saleem Abdulrasool ac6ec0b19d SystemInternals: make WindowsSyscallAdapters build
Correct some type errors, missing return type.  Add a FIXME comment
regarding large file access.
2020-10-24 12:16:33 -07:00
Saleem Abdulrasool bf90fedc88 SystemInternals: make Mocking build on Windows
Fix some of the type errors and add missing imports.
2020-10-23 14:32:24 -07:00
Michael Ilseman 28916d22fb Merge pull request #11 from milseman/aperture_adapters
Windows syscall adapters
2020-10-23 13:52:04 -07:00
Michael Ilseman 1eeeaf7200 Initial Windows syscall adapters 2020-10-23 09:07:41 -07:00
Michael Ilseman 5712a28377 Windows TLS mocking support 2020-10-23 09:07:41 -07:00
Michael Ilseman 8f2622ad40 Merge pull request #10 from milseman/yarn_regional_warehouse
TLS helpers to ease Windows support
2020-10-23 08:12:54 -07:00
Michael Ilseman 173c684973 TLS helpers to ease Windows support 2020-10-22 14:42:03 -07:00
Michael Ilseman d93ee62bbd Merge pull request #8 from milseman/mimus_polyglottos
Syscall mock testing
2020-10-22 11:14:11 -07:00
Michael Ilseman ab94d189df More mocking infra testing 2020-10-22 10:53:09 -07:00
Michael Ilseman d2e26f72f3 Fix memory leak in withMockingEnabled 2020-10-22 10:43:12 -07:00
Michael Ilseman a8d07f8a04 Leverage conditional compilation to reduce mocking boilerplate 2020-10-22 10:39:09 -07:00
Michael Ilseman 98a1531ea0 Remove mocking infrastructure from non-mocking builds 2020-10-21 16:09:04 -07:00
Michael Ilseman 138c7f1a71 Add Linux support for syscall mocking 2020-10-21 09:40:08 -07:00
Michael Ilseman 9489545fed Syscall mock testing
Adds mocking and tracing infrastructure, test
infrastructure, and trace-based tests.
2020-10-21 09:22:46 -07:00
Michael Ilseman 8ffa04c0a0 Initial version of Swift System 0.0.1 2020-09-25 08:20:58 -07:00
Michael Ilseman ea26e3e428 Initial commit 2020-09-25 08:20:42 -07:00