59 Commits

Author SHA1 Message Date
Jeremy Schonfeld
e66da6991e
Increase package deployment target to macOS 15 (#1142)
* Bump deployment target to macOS 15

* Resolve deprecation warnings

* Remove unnecessary availability checks from unit tests
2025-01-28 12:28:25 -08:00
Tina Liu
7aadc4180f
Add FoundationPreview 6.1 as an allowed availability annotation (#1111)
Addressses 141855917
2025-01-06 09:30:27 -08:00
Jeremy Schonfeld
5a39fc4e6c
Add FoundationPreview 6.2 as an allowed availability annotation (#1057) 2024-11-21 19:09:08 -08:00
Jeremy Schonfeld
919053f763
Ensure predicate diagnostics contain source information when possible (#1025) 2024-11-05 12:20:27 -08:00
Jeremy Schonfeld
bc7c257944
Update to swift-syntax 600.0.0 (#959) 2024-10-04 12:50:17 -07:00
Hristo Staykov
79dc3091aa
Add .count and .date properties to Calendar.RecurrenceRule.End (#888)
`Calendar.RecurrenceRule.End` is de-facto an enum, but has been implemented as a
struct so we can more easily extend it in the future without breaking ABI. Sadly
the current API only provides a way to construct the struct, and does not let us
introspect the associated values. This change adds a couple read-only properties
to the struct to address this.

While at it, we also make the struct conform to `CustomStringConvertible`, so it
doesn't leak implementation details when it's printed in the debugger.
2024-09-14 13:54:23 -07:00
Jeremy Schonfeld
eaa0b3b537
Remove RegexBuilder conditional (#879) 2024-08-20 14:49:43 -07:00
Yuta Saito
c86692f7e7
Enable wasi-libc emulation features (#777)
* Enable wasi-libc emulation features

Those features require explicit macro definitions to be enabled, so add
them to the package definition. Only affects WASI builds.

* Prefer `TARGET_OS_WASI` over `__wasi__`

And explain why we need definition checks for `signal.h` and `sys/mman.h`
2024-08-06 02:20:54 +09:00
Jeremy Schonfeld
7a98f9c1b8
Remove FoundationPreview umbrella module (#818)
* Remove FoundationPreview umbrella module

* Fix test failures
2024-08-02 15:04:39 -07:00
Charles Hu
b6ca869393
Upgrade SwiftFoundationICU to version 74 (#802) 2024-08-01 16:49:42 -07:00
Jeremy Schonfeld
597cfb9524
Update availability release for FoundationPredicateRegex (#760) 2024-07-24 10:24:23 -07:00
Jeremy Schonfeld
9bfbc0cfe7
Bump swift-foundation-icu to 0.0.9 (#738) 2024-07-16 11:41:11 -07:00
Alex Hoppen
131d89f356
Update swift-syntax links to swiftlang/swift-syntax (#701) 2024-06-26 09:49:10 -07:00
Charles Hu
60506f3af4
Renamed _CShims to _FoundationCShims (#656)
Rationale: _CShims will effectivly become semi-public in the toolchain. We add the Foundation prefix to make it less generic.
2024-06-21 16:18:38 -07:00
Jeremy Schonfeld
4c8f0f21ea
Add SWIFTCI_USE_LOCAL_DEPS build mode (#694) 2024-06-21 10:56:03 -07:00
Charles Hu
8976fc4fd6
Introduce Cmake support for SwiftFoundation (#573) 2024-06-16 22:21:28 -07:00
Tony Parker
caa08cf226
Enable complete concurrency checking in Foundation 2024-06-04 10:41:59 -07:00
Charles Hu
2a8e9438ec
Upgrade FoundationICU to 0.0.7 (#645) 2024-05-31 13:50:07 -07:00
Saleem Abdulrasool
6e7520ad30
(127743138) build: adjust package manifest to allow building on Windows (#596)
SPM does not permit building macro tests on Windows due to mishandling
of build types, resulting in multiply defined `main` which is a strong
error on Windows. As a workaround, remove the macro tests for the time
being.
2024-05-08 09:22:41 -07:00
Charles Hu
43f1140e5c
Upgrade FoundationICU to 0.0.6 (#523) 2024-03-29 17:24:55 -07:00
Charles Hu
543bd69d7d
Rename DurationTimeFormatStyle and DurationUnitsFormatStyle to add Test suffix (#516)
resolves rdar://125511901, rdar://125569243
2024-03-28 15:53:29 -07:00
Jeremy Schonfeld
3b02bbea1a
(125503063) Update swift-syntax dependency to 510.0.0 2024-03-27 13:37:38 -07:00
Charles Hu
e9dd393e40
Update FoundationICU to fix broken unit tests (#509) 2024-03-26 15:39:01 -07:00
Jeremy Schonfeld
69a6e9f490
(124398026) Update swift-collections dependency to the 1.1 tag 2024-03-11 11:24:24 -07:00
Tony Parker
0be1758b4f Various fixes to make PropertyListEncoder and PropertyListDecoder build cross-platform 2024-03-06 15:57:33 -08:00
Jeremy Schonfeld
71c3c9491e
(123851566) Update 9998 availability to 10000 availability 2024-02-29 12:37:41 -08:00
Jeremy Schonfeld
f62e0566d2
(105132171) Predicate Regex Support
* (105132171) Predicate Regex Support

* (105132171) Fix test failures
2024-02-28 15:50:10 -08:00
Jeremy Schonfeld
33856a556d
(120741818) Port FileManager to swift-foundation
* (120741818) Port FileManager to swift-foundation

* (120741818) Fix linux test failures

* (120741818) Fix build failures
2024-02-09 15:03:43 -08:00
Tony Parker
d090eef3ab
Use deployment target instead of 9999 for min OS version (#384) 2024-01-17 16:14:29 -08:00
Charles Hu
4f930e8ee7
Upgrade SwiftFoundationICU to 0.0.5 (#382) 2024-01-17 11:27:57 -08:00
Charles Hu
c6f774ff6f
Update FoundationICU to 0.0.4 (#304) 2023-12-07 10:40:19 -08:00
Jeremy Schonfeld
55dad24f7e
Bump swift-syntax dependency to 509.0.2 2023-11-01 10:22:54 -07:00
Jeremy Schonfeld
95a115ff32
Update remaining Predicate tests to use the #Predicate macro 2023-10-26 09:51:03 -07:00
Charles Hu
30bc5b99f2
Introduce Availability Macros for FoundationPreview (#279) 2023-10-04 14:44:37 -07:00
Jeremy Schonfeld
4c60f58edc
Update swift-syntax tag to 509.0.0 2023-09-18 13:06:01 -07:00
Jeremy Schonfeld
2ea7b64b77
Enable the #Predicate macro on Linux 2023-09-11 15:02:21 -07:00
Jeremy Schonfeld
292fb1400d
Macro tests should run on linux 2023-08-23 12:06:06 -06:00
Jeremy Schonfeld
1f9172d552
(113345892) Move predicate macro to FoundationPreview 2023-08-22 15:03:52 -06:00
Karoy Lorentey
06ea8b042f
Start using Rope for attribute run storage (#166)
* rdar://108152217 Start using Rope for attribute run storage

- Replace `Array<_InternalRun>` with `Rope<_InternalRun>`.
- Fix semantics of AttributeRunBoundaries.character. It no longer pretends that attributes can be tied to grapheme clusters — that never actually worked properly, and it cannot be supported without breaking the intended use case.
- Remove cache of latest run position; log(n) might be fast enough that we don’t need to worry about that.
- Switch AttributedString.Guts members to take/return BigString.Index values, not AttributedString indices. This cuts down on constant back-and-forth conversions.
- Discard unused Guts members; update remaining mutation methods to follow Swift naming conventions.
- Stop using the `public extension` language misfeature.

* rdar://108152217 Apply notes from code review

AttributedString.CharacterView and AttributedString.UnicodeScalarView
did not use the right semantics in the case when the underlying text
was not touched. It’s okay in that case to not mutate text storage,
but we still want to override the attributes within the subrange as if
the client actually did replace text — as in, we want to use precisely
the same attribute storage for the range on both paths.

Also, make sure we correctly enforce attribute constraints in the
`!hasStringChanges` case, in both views.

* rdar://108152217 Fix logic error in AttributedString.Runs.subscript

(Discovered during code review.)

* rdar://108152217 Clean up CharacterView/UnicodeScalarView mutations & update failing test

* rdar://108152217 Apply review notes
2023-06-26 13:51:15 -07:00
Charles Hu
46da6ae60f
Upgrade swift-foundation-icu to avoid package resources (#173) 2023-06-09 10:56:29 -07:00
Saleem Abdulrasool
93e624db0a
build: add a workaround for Windows tests (#146)
This adds a conditional handling of `FoundationInternationalization`
tests if the `RegexBuilder` module is available.  This currently is
unavailable on Windows, which prevents building a complete set of
targets.  Adjust the build to accommodate this configuration and
automatically enable the tests when the module is available.
2023-05-26 09:01:48 -07:00
Saleem Abdulrasool
0df7098bdf
build: define _CRT_SECURE_NO_WARNINIGS on Windows
We need to define this macro to avoid warnings due to the use of
non-bounded buffer operations.  Without this, we end up with an
overwhelming number of warnings.
2023-05-15 06:49:27 -07:00
Charles Hu
629b1463fa
Upgrade swift-foundation-icu to 0.0.2 (#114) 2023-05-12 11:45:57 -07:00
Jeremy Schonfeld
9c72d351d2
(105902981) Replace @_implementationOnly imports with package imports in FoundationPreview (#109) 2023-05-12 11:36:10 -07:00
Tina Liu
3aa00e5c3e
Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)" (#115)
* Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)"

This reverts commit 8f08a649db1f3eb31593cdae7a30c5e95cb614a7.

* Reapply fb718cd3fb9f058a5fd6d736cec9c2b99d6f7dc6 fix to the other restored LockedState
2023-05-11 15:19:01 -07:00
Tina Liu
8f08a649db
Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)
* Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials

- Modules will access FoundationInternals types with `package import FoundationInternals`. This is currently an experimental feature of `AccessLevelOnImport`.
- Move `LockedState` to FoundationInternals and publicize functions needed by other modules.
2023-05-10 12:16:20 -07:00
Mishal Shah
45fd2e13e6
Update Package.swift to use https over ssh for swift-foundation-icu (#73) 2023-04-27 09:23:18 -07:00
Jeremy Schonfeld
74042fa61a
Fix 5.9 toolchain requirement for Xcode builds (#55) 2023-04-25 15:43:29 -07:00
Karoy Lorentey
e9b2f68e8a
rdar://107778676 Stop vendoring the Collections package (#50)
* rdar://107778676 Stop vendoring the Collections package

* rdar://107778676 Fix test expectation

AttributedString.CharacterView needs to round all indices down to the
nearest Character boundary to avoid semantic issues with its
Collection conformance. This means that CharacterView slices can never
start or end in between Character boundaries.

* Remove a stray print statement
2023-04-25 13:44:02 -07:00
Charles Hu
0ff99c95d2
rdar://108208907 (Point FoundationPreview to swift-foundation-icu 0.0.1 tag) (#37) 2023-04-18 11:23:46 -07:00