Commit Graph

184213 Commits

Author SHA1 Message Date
Mishal Shah
b3e7c68bcd Update Runtimes/Supplemental/StringProcessing/CMakeLists.txt to 6.2.1 2025-08-27 14:39:24 -07:00
Mishal Shah
4e8f952ff5 Update Runtimes/Overlay/CMakeLists.txt to 6.2.1 2025-08-27 14:39:13 -07:00
Mishal Shah
e30e85385b Update Runtimes/Core/CMakeLists.txt to 6.2.1 2025-08-27 14:38:57 -07:00
Pavel Yaskevich
bbb11ec272 [TypeCheckEffects] AbstractFunction: Parameter types should be mapped into context
Parameter type could be represented by an associated type which is
bound to a concrete type by an extension, `AbstractFunction::getType()`
should map it into context before returning because the construct is
that it always produces a function type.

Resolves: rdar://156955193
(cherry picked from commit 32b97d0e2a)
(cherry picked from commit 7f652915d9)
2025-08-27 10:35:50 -07:00
Mishal Shah
95fefa36e1 Update the runtime version to 6.2
(cherry picked from commit 9231f97885)
2025-08-26 23:40:03 -07:00
Mishal Shah
70616b4dea Update the runtime version to 6.2.0 for Overlay and Supplemental
(cherry picked from commit 9f6a789374)
2025-08-26 23:40:03 -07:00
Charles Zablit
caec84cd54 [windows] upgrade to Python 3.10.1 2025-08-27 00:21:51 +01:00
Adrian Prantl
55f82ea3a0 Merge pull request #83845 from charles-zablit/charles-zablit/demangling/make-printGenericSignature-virtual-to-6.2.1
🍒 [demangling] make printGenericSignature virtual
2025-08-22 08:24:42 -07:00
Charles Zablit
6324f20318 [demangling] make printGenericSignature virtual 2025-08-21 15:09:15 +01:00
Finagolfin
bfac55b009 [build] Change Foundation macro checks because of #83422
I missed that `build-script` passes back `false` instead, so use the `true_false`
function for broader checking.
2025-08-19 18:46:02 +05:30
Finagolfin
8a9ae8d789 [build] Make the new --cross-compile-build-swift-tools flag public
This new flag makes it easy to build Swift cross-compilation toolchains, by
disabling cross-compilation of all host tools, like the Swift compiler and
various macros, building on prior pulls #38441 and #82163.

Also, add two class methods to the Testing macros product so it works with #83260.
2025-08-19 18:45:49 +05:30
finagolfin
2de7f9427a [build][android] Use a CMake toolchain file to cross-compile Testing (#83260)
Also, disable a recently failing test for Android armv7.
2025-08-19 18:45:31 +05:30
Finagolfin
c7529a04b6 Only bring over supporting change of generate_linux_toolchain_file() from fcc03898c,
specifically the change that makes the following possible on linux:

    "* under Linux, do not cross compile LLVM when building for the host
     architecture -- that will ensure that the compiler-rt build will use
    the just built compiler and not the system one (which may not be
    new enough for this purpose);"
2025-08-19 18:45:15 +05:30
Marc Prud'hommeaux
5212e0f023 Support 16 KB page sizes on Android (#81596)
Android 15+ requires that native libraries be compiled with a linker
flag to support 16 KB page sizes. See:
https://developer.android.com/guide/practices/page-sizes#compile-r26-lower
2025-08-19 18:44:57 +05:30
Mishal Shah
32e10149dd Merge pull request #83749 from swiftlang/bump-version-6.2.1
Bump the Swift version to 6.2.1
2025-08-15 09:11:33 -07:00
Mishal Shah
7aac9e3c6e Merge pull request #83747 from swiftlang/2-add-support-for-swift-6.2.0-6.2.1
[6.2.1][update-checkout] Add support for Swift 6.2.0 and 6.2.1
2025-08-14 23:23:04 -07:00
Mishal Shah
1082d64b06 Bump the Swift version to 6.2.1 2025-08-14 23:21:36 -07:00
Mishal Shah
3ef2ee6518 [update-checkout] Add support for Swift 6.2.0 and 6.2.1
(cherry picked from commit f906535bec)
(cherry picked from commit 94d331d23e)
2025-08-14 22:42:41 -07:00
Gábor Horváth
5cc6f245d0 Merge pull request #83592 from Xazax-hun/fix-bridging-header-reverse-interop-on-6.2 swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-10-a 2025-08-09 08:27:35 +01: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!
-->
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-09-a
2025-08-08 17:13:13 -07:00
Gábor Horváth
ef63ec99e9 [6.2][cxx-interop] Fix crash when using bridging headers in reverse interop
Explanation: The original code had the assumption we only import
modules. However, there is a flag to import an umbrella header in which
case the clang nodes have no owning module. This PR prevents a null
dereference in that case.
Issues: rdar://157489426
Original PRs: #83540
Risk: Low, added a check to avoid null dereference.
Testing: Added a compiler test.
Reviewers: @egorzhdan
2025-08-07 15:58:31 +01:00
Augusto Noronha
0f0552886e Merge pull request #83557 from augusto2112/6.2-fix-opaque-infinite-rec
[DebugInfo] Fix infinite recursion when opaque return type is defined inside function returning it
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-07-a
2025-08-06 12:00:30 -07:00
Konrad `ktoso` Malawski
2135b4d636 Merge pull request #83560 from eeckstein/fix-test-6.2
[6.2] tests: increase the timeout for `large_nested_array.swift.gyb`
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-06-a
2025-08-06 17:02:57 +09:00
Erik Eckstein
d2e872fe6b tests: increase the timeout for large_nested_array.swift.gyb
This fixes a timeout failure in CI. It looks like that some CI machines are slower than expected.
I could not reproduce this locally. There doesn't seem to be a compile time regression.
2025-08-06 09:55:19 +02:00
Augusto Noronha
7b46d41823 [DebugInfo] Fix infinite recursion when opaque return type is defined
inside function returning it

A stack overflow would happen when the compiler tried emitting debug
info for a function whose opaque return type was declared inside the
function itself. This fixes the issue by emitting a forward declaration
for the function before emitting it.

rdar://150313956

(cherry picked from commit c03831f70d)
2025-08-05 17:36:28 -07:00
Hamish Knight
a8cea97b4b Merge pull request #82988 from hamishknight/enable-inlinearray-sugar-6.2
[6.2] Enable InlineArray type sugar
2025-08-05 22:21:05 +01:00
Adrian Prantl
aa3b06252d Merge pull request #83526 from adrian-prantl/157063577-6.2
[ClangImporter] Prefer serialized bridging headers in LLDB.
2025-08-05 09:43:47 -07:00
Adrian Prantl
95ad22e799 [ClangImporter] Prefer serialized bridging headers in LLDB.
Especially in an explicit modules project, LLDB might not know all the
search paths needed to imported the on disk header.

rdar://157063577
(cherry picked from commit a6678476d8)
2025-08-04 11:15:55 -07:00
Michael Gottesman
99a2db3392 Merge pull request #83410 from gottesmm/release/6.2-156919493
[6.2][concurrency] Emit nonisolated(nonsending) async throw initializers correctly
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-01-a
2025-07-31 09:41:12 -07:00
Pavel Yaskevich
88f32b364e Merge pull request #83434 from xedin/rdar-157061896-6.2
[6.2][Concurrency] Downgrade errors when isolated member is referenced fro…
2025-07-31 09:06:04 -07:00
Pavel Yaskevich
c04eb7c482 [Concurrency] Downgrade errors when isolated member is referenced from a preconcurrency context
Such references used to be downgraded until Swift 6 but since the
context is `@preconcurrency` it should be possible for API authors
to introduce concurrency annotations such as `@Sendable` without
breaking clients even when they are compiled in Swift 6 mode.

Resolves: rdar://157061896
(cherry picked from commit 5ee673f358c9dd7dbbfe58f02bc78af60e0377b8)
2025-07-30 11:03:30 -07:00
Alexis Laferrière
eba3593d16 Merge pull request #83401 from swiftlang/revert-83234-wip-155863017-6.2
Revert "[6.2][Test] Fix IRGen/abi_v7k.swift"
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-31-a
2025-07-30 11:03:06 -07:00
John McCall
369c75b121 Merge pull request #83386 from rjmccall/rewrite-nonisolated-nonsending-closure-types-6.2
[6.2] Rewrite the type of `nonisolated(nonsending)` closures
2025-07-30 13:10:36 -04:00
Michael Gottesman
9bfaeb3d7c Fix a test for difference in betwen macOS and Linux/Windows.
Specifically, I removed an availability flag on two SIL functions.

(cherry picked from commit 46148545d7)
2025-07-29 20:10:46 -07:00
Michael Gottesman
dcb3e5c48e [concurrency] Emit nonisolated(nonsending) async throw initializers correctly.
Specifically, we were not inserting the implicit isolated parameter and were not
setting up the actor prologue. To keep this specific to nonisolated(nonsending)
code, I only setup the actor prologue if we know that we have something that is
nonisolated(nonsending).

I also ported some async initializer tests to run with/without
nonisolated(nonsending) just to increase code coverage.

rdar://156919493
(cherry picked from commit 3871d22257)
2025-07-29 20:10:44 -07:00
Adrian Prantl
5754397c94 Merge pull request #82968 from swiftlang/dl/6.2-RemoteInspection-Add-AsyncTaskInfo.IsSuspended-based-on-HasTaskDependency
[6.2] RemoteInspection: Add AsyncTaskInfo.IsSuspended based on HasTaskDependency
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-30-a
2025-07-29 11:12:40 -07:00
Dario Rexin
fe0b2ecbe4 Revert "[6.2][Test] Fix IRGen/abi_v7k.swift" 2025-07-29 10:43:38 -07:00
John McCall
787cca9e37 Rewrite the type of nonisolated(nonsending) closures.
The constraint solver does not reliably give closures a function type
that includes `nonisolated(noncaller)`, even when the immediate context
requires a conversion to such a type. We were trying to work around this
in SILGen, but the peephole only kicked in if the types matched exactly,
so a contextual conversion that e.g. added `throws` was still emitting
the closure as `@concurrent`, which is of course the wrong semantics.
It's relatively easy to avoid all this by just rewriting the closure's
type to include `nonisolated(nonsending)` at a point where we can reliably
decide that, and then SILGen doesn't have to peephole anything for
correctness.

Fixes rdar://155313349
2025-07-28 22:22:54 -04:00
Yuta Saito
73209e1ea0 Merge pull request #83358 from kateinoigakukun/yt/cherry-pick-6.2-gh83356 swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-29-a 2025-07-29 00:50:57 +09:00
Alastair Houghton
e7deaebacd Merge pull request #83331 from al45tair/eng/PR-156710569-6.2
[Concurrency] Update availability of UnimplementedExecutor.
2025-07-28 12:42:57 +01:00
Yuta Saito
e25995ac5d [wasm] Fix installation paths for libxml2.a
Clang driver only passes arch-specific library paths as search paths
to the linker for WebAssembly targets but we were installing
libxml2.a under `<sysroot>/lib` without the multiarch triple. It led
to the linker not finding libxml2.a when importing FoundationXML
2025-07-27 23:07:42 +00:00
Slava Pestov
95baef19df Merge pull request #83300 from slavapestov/update-availability-macros-26-6.0
[6.2] Update utils/availability-macros.def
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-26-a
2025-07-26 10:47:45 -04: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
Doug Gregor
99555bd3a9 Merge pull request #83341 from DougGregor/default-isolation-extensions-6.2
[6.2] Extensions and members thereof can apply default isolation
2025-07-25 21:47:18 -07:00
Dario Rexin
6af1ab88e0 Merge pull request #83234 from drexin/wip-155863017-6.2
[6.2][Test] Fix IRGen/abi_v7k.swift
2025-07-25 17:02:16 -07:00
Alastair Houghton
4f7be0814a [Concurrency] Update availability of UnimplementedExecutor.
We need it to be `StdlibDeploymentTarget 6.2` rather than
`SwiftStdlib 6.2`, so that we can update the availability definitions.

rdar://156710569
2025-07-25 15:45:46 -04:00
Slava Pestov
7fabd38ed0 Update utils/availability-macros.def 2025-07-25 15:45:44 -04:00
Doug Gregor
20a10c618e [SE-0466] Treat explicit "nonisolated" like implicit "nonisolated" on protocols
Make explicit "nonisolated" also not special on protocols, so a
nonisolated protocol does not suppress default isolation.
SendableMetatype is the proper way to suppress default isolation for a
protocol.

Unfortunately, these rules made it appear like issue #82168
was fixed, when in fact it was not. Keep the test case, but as a
failing test, and we'll investigate separately.
2025-07-25 12:21:38 -07:00
Doug Gregor
5abbf2e4c9 [SE-0466] Under main actor default isolation, explicit nonisolated is not special
Given an explicitly-nonisolated type such as

    nonisolated struct S { }

all extensions of S were also being treated as nonisolated. This meant
that being implicitly nonisolated (i.e., when you're using nonisolated
default isolation) was different from explicitly-writing nonisolated,
which is unfortunate and confusing. Align the rules, such that an
extension of S will get default isolation:

    extension S {
      func f() { } // @MainActor if we're in main actor default isolation
    }
2025-07-25 12:21:35 -07:00