Commit Graph

3253 Commits

Author SHA1 Message Date
Jonathan Grynspan
561836a6e6 [6.2] Add Equatable and Hashable conformance to GUID. 2025-10-10 17:48:06 -04:00
Mishal Shah
cbad8a5d9d Merge pull request #84194 from swiftlang/fedora-41-swift-6.2
[6.2] Fix/disable tests for Fedora 41
2025-09-24 20:41:22 -07:00
John McCall
f72fd5aa8f Merge pull request #82930 from nickolas-pohilets/mpokhylets/6.2-weak-let
[6.2] Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature
2025-09-11 20:02:39 -04:00
Andrew Sukach
6598b0a1b3 Add missing symbols for Fedora 41
(cherry picked from commit 4cf7940226)
2025-09-09 22:49:54 -07:00
Evan Wilde
9feaec439d Add missing symbols for Fedora41
Fixing the linux symbol check to unblock nightly packages.

(cherry picked from commit 66a4e52a87)
2025-09-09 22:49:54 -07:00
Ryan Mansfield
69d6e4477c [6.2] [test] Import locale modules explicitly in PrintFloat.swift.gyb.
Darwin module is being split up and will eventually stop importing
locale APIs.

rdar://159305532
2025-08-28 13:12:06 -04:00
Guillaume Lessard
d03de08221 Merge pull request #83775 from glessard/rdar158440246-62
[stdlib, 6.2.x] guard against deinitializing empty OutputSpan instances
2025-08-22 13:42:00 -07:00
Mykola (Nickolas) Pokhylets
5d70bea757 Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature
See https://github.com/swiftlang/swift/pull/80440 and https://github.com/swiftlang/swift/pull/82732
2025-08-22 10:31:42 +02:00
Guillaume Lessard
f593d75d04 [test] removeAll() from an empty OutputSpan 2025-08-16 04:13:09 -07:00
Philippe Hausler
838cb7a91b Revert "[Observation] Ensure deinitialized Observable types don't leave active observations in memory (#82752)" (#83492)
This reverts commit a349e64039.

This is in concert of https://github.com/swiftlang/swift/pull/83436

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->
2025-08-08 17:13:13 -07:00
Max Desiatov
ab7cd238fd [6.2] test/CMakeLists.txt: run Embedded Swift for Wasm tests (#83287)
Cherry-pick of #83128, #82399, and #82878, merged as ea6ca2b5db, 0c4e56174b, and e34eb3331f respectively.

**Explanation**: Currently `test/CMakeLists.txt` can only set `SWIFT_LIT_ARGS` for all tests uniformly. This means that we can't have tests for Embedded Swift with a different set of `lit.py` arguments.

Also, create new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support WASI Clang resource dir, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`.

**Scope**: Limited to Embedded Swift test suite.
**Risk**: Low, due to limited scope.
**Testing**: #82878 was incubated on `main` for 2 weeks, #82399 for 3 weeks with no disruption, #83128 merged this week, but enables all these tests on CI, which are consistently passing.
**Issue**: rdar://156585717
**Reviewer**: @bnbarham
2025-07-26 09:48:47 +01:00
David Smith
215620af3d [6.2] Fix lengthOfBytes(using:) semantics (#83340)
(cherry picked from commit ea7c3d4ec8)
2025-07-25 22:22:51 -07:00
David Smith
155d7fbbcf [6.2] Make sure SwiftObject doesn't crash when compared to tagged pointers (#83271)
Cherry pick of https://github.com/swiftlang/swift/pull/83269
2025-07-25 01:11:46 -07:00
Guillaume Lessard
a345e3a8b3 Merge pull request #83000 from glessard/rdar147780495-OutputSpan-updates-62
[SE-0485, 6.2] OutputSpan and OutputRawSpan
2025-07-17 19:12:58 -07:00
Guillaume Lessard
66e62302fa [test] OutputRawSpan tests 2025-07-16 17:19:41 -07:00
Guillaume Lessard
5ba72f267f Merge pull request #83023 from glessard/rdar155474776-extracting-62
[SE-0488, 6.2] Implementation for SE-0488
2025-07-15 13:59:29 -07:00
Guillaume Lessard
6414aa226f [stdlib] rename RawSpan.extracting functions 2025-07-12 22:58:00 -07:00
Guillaume Lessard
ac3e47612c [stdlib] rename Span.extracting functions 2025-07-12 22:58:00 -07:00
Guillaume Lessard
746324b4ba [test] fix test of InlineArray initializer 2025-07-11 19:03:03 -07:00
Guillaume Lessard
402a0cf2c8 [stdlib] remove bulk-update from MutableRawSpan per SE-0485 2025-07-11 19:03:03 -07:00
Guillaume Lessard
34a26d6d9a [stdlib] remove bulk-update from MutableSpan per SE-0485 2025-07-11 19:03:03 -07:00
Guillaume Lessard
3b4279c671 [stdlib] rename MutableRawSpan.extracting functions 2025-07-11 19:03:03 -07:00
Guillaume Lessard
05fe6fa522 [stdlib] rename MutableSpan.extracting functions 2025-07-11 19:03:03 -07:00
Guillaume Lessard
f11f3a9b72 [stdlib] make OutputSpan changes from SE-0485 2025-07-11 19:03:02 -07:00
Guillaume Lessard
a2a9f46907 [test] simplify OutputSpan-InlineArray test 2025-07-11 19:03:02 -07:00
Guillaume Lessard
d078734051 [stdlib] InlineArray consumed by OutputSpan 2025-07-11 19:03:01 -07:00
Guillaume Lessard
9f9565f4b2 [stdlib] in-place initializer for InlineArray 2025-07-11 19:03:01 -07:00
Guillaume Lessard
0fc95ef94e [test] OutputSpan tests 2025-07-11 19:03:01 -07:00
Philippe Hausler
a349e64039 [Observation] Ensure deinitialized Observable types don't leave active observations in memory (#82752)
Explanation:
This ensures a potential leak with SwiftUI and other systems using
Observation do not leak observation closures when the potential
Observable instances used are only weakly referenced inside the tracking
closure.
 
Scope:
This is limited to the runtime behavior of Observable types and has no
ABI or language level interactions.

Issues:
rdar://112167556

Original PRs:
https://github.com/swiftlang/swift/pull/79823
https://github.com/swiftlang/swift/pull/82307

Risk:
Low - This is very targeted to just Observation, however it is a
behavioral change which does not make this a zero risk change.

Testing:
New unit tests were added to catch at least some of the potential cases
this issue can occur with.
2025-07-10 17:14:27 -04:00
Guillaume Lessard
b78124470c Merge pull request #82896 from glessard/rdar154331399-makeReallyContiguous-62
[stdlib, 6.2] Make String.makeContiguousUTF8() strictly true
2025-07-09 15:47:15 -07:00
Guillaume Lessard
c90cb5862e [test] small string compatibility for 32-bit targets 2025-07-08 14:34:50 -07:00
Guillaume Lessard
ccab81d134 [test] immortal no-parameter Span initializers 2025-07-08 09:48:00 -07:00
Guillaume Lessard
0a13d1e8ba [stdlibUnittest] generalize expectNil(_:) 2025-07-01 15:30:45 -07:00
Guillaume Lessard
a3a7af3bd6 [test] shorten a 32-bit small string (sometimes) 2025-06-27 10:23:51 -07:00
Guillaume Lessard
23ce3243a3 [test] adjust String span tests 2025-06-27 10:22:36 -07:00
Guillaume Lessard
484d7c7d46 Merge pull request #82422 from glessard/rdar153219174-UMBP-mutableSpan-62
[stdlib, 6.2] add missing computed properties (again)
2025-06-25 14:44:48 -07:00
Guillaume Lessard
5046c2a529 [stdlib] add UMBP.mutableSpan accessor 2025-06-23 11:20:48 -07:00
Guillaume Lessard
7ee3f85b7e [stdlib] add URMBP.mutableBytes accessor 2025-06-23 11:20:47 -07:00
Guillaume Lessard
9de70180f7 Revert "Merge pull request #82284 from glessard/rdar153219174-UMBP-mutableSpan-62"
This reverts commit 845b68a7c4, reversing
changes made to 3d1c592456.
2025-06-18 13:55:44 -07:00
Guillaume Lessard
ea14407cb1 [stdlib] add UMBP.mutableSpan accessor 2025-06-17 15:57:52 -07:00
Guillaume Lessard
7ab45ca442 [stdlib] add URMBP.mutableBytes accessor 2025-06-17 15:57:52 -07:00
finagolfin
6611ea97e9 [android][test] Fix or disable the remaining failing tests on the Android CI (#81398)
Also, fix and enable `IRGen/lto_autolink` for all non-Wasm targets and
`IRGen/static_initializer` for aarch64.

This should get [the community Android
CI](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/)
green
[again](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/).
2025-06-11 21:52:04 +05:30
Guillaume Lessard
4bc3eadc96 [test] UTF8Span from inline-stored Substring instances 2025-06-09 14:19:41 -07:00
Guillaume Lessard
d587809417 [test] UTF8Span from inline-stored String instances 2025-06-09 14:19:40 -07:00
Guillaume Lessard
4ecf66d4b0 [stdlibUnittest] generalize expectNotNil(_:)
Generalizes it for non-copyable and non-escapable values.
2025-06-09 14:19:39 -07:00
Guillaume Lessard
3a0f890ef0 Merge pull request #80742 from glessard/rdar137710901-addressable-utf8view-span
[6.2, SE-0456] enable span properties for the small-String representation
2025-06-09 14:11:58 -07:00
Pavel Yaskevich
d8642fce19 [Tests] NFC: Update all of the test-cases improved by changes to generic argument mismatch handling
(cherry picked from commit 4132aa04f9)
2025-06-03 09:33:13 -07:00
Pavel Yaskevich
a6827c605d [CSSimplify] Detect when generic argument mismatch applies to argument and produce a tailed fix
The problem detection logic currently expects `generic argument #<N>`
location to always be associated with two generic types, but that
is not always the case, this locator element is sometimes used for
i.e. optional object types and pointer `Pointee` type when types
appear in argument positions. This needs to be handled specifically.

Resolves: rdar://82971941
(cherry picked from commit ded6158cc3)
2025-06-03 09:33:13 -07:00
Erik Eckstein
09d2464578 SILGen: insert an end_lifetime in the throw-branch of a Builtin.emplace
When the called closure throws an error, it needs to clean up the buffer.
This means that the buffer is uninitialized at this point.

We need an `end_lifetime` so that the move-only checker doesn't insert a wrong `destroy_addr` because it thinks that the buffer is initialized.

Fixes a mis-compile.

rdar://151461109
2025-05-19 13:47:49 +02:00
Slava Pestov
874449374e RemoteInspection: Support for parameter packs 2025-05-09 14:50:19 -04:00