Commit ed54203
authored
Replace partial MiniFoundation with FoundationEssentials (#307)
Give up on the overwhelming –and dumb– task of replacing Foundation
completely. The footprint with FoundationEssentials is only marginally
bigger, for dramatic benefits. If going serious at some point, dropping
Swift would be a much wiser choice in the future.
Basically, merge MiniFoundation Native and Compat targets. Then export
Foundation on Apple, and FoundationEssentials everywhere else. In the
latter case, add some custom code behind the MINIF_COMPAT symbol to
attain feature-parity with Foundation for the sake of the library.
MiniFoundation folders:
- Foundation (Apple)
- FoundationCompat (cross)
- FoundationEssentials (Apple and cross)
- Everything else is shared as before
Steps:
- Delete SWON, rely on Codable/JSONEncoder/JSONDecoder
- Delete redundant reimplementations (Data, Date, FileManager, URL,
UUID)
- Delete unused C code
- Delete "mini" wrappers in the middle (e.g. MiniURLProtocol)
- Return contents of URL path, not of a generic URL (would potentially
require networking)
- Implement compatible regular expressions in C++ (still targeting Swift
5.x)
- Always export Dispatch
- Disambiguate UUID on Windows
CMake issues:
- Enforce FoundationEssentials autolinked libs manually in Linux/Android
toolchains ([dynamic linking failure if autolinked libs are not
provided](https://forums.swift.org/t/missing-symbol-with-static-foundationessentials-on-linux/85044/))1 parent e23ba70 commit ed54203
File tree
83 files changed
+297
-3028
lines changed- .github/workflows
- Sources
- MiniFoundationCompat
- MiniFoundationCore_C
- 3rd
- include
- MiniFoundationCore
- MiniFoundationExample
- MiniFoundationNative
- MiniFoundation_C
- include
- MiniFoundation
- Core
- FoundationCompat
- FoundationEssentials
- Foundation
- JSON
- Streams
- PartoutCore
- Logging
- Profile
- PartoutOpenVPNConnection/Internal
- Tests
- MiniFoundationTests
- PartoutCoreTests
- PartoutOpenVPNTests
- toolchains
- vendors
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
83 files changed
+297
-3028
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | | - | |
61 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
| |||
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
144 | | - | |
145 | | - | |
| 139 | + | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
| |||
426 | 420 | | |
427 | 421 | | |
428 | 422 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 423 | + | |
434 | 424 | | |
435 | 425 | | |
436 | 426 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
| 427 | + | |
450 | 428 | | |
451 | 429 | | |
452 | 430 | | |
| |||
458 | 436 | | |
459 | 437 | | |
460 | 438 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | 439 | | |
471 | 440 | | |
472 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | 95 | | |
97 | 96 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 97 | | |
103 | | - | |
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
File renamed without changes.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
File renamed without changes.
0 commit comments