Skip to content

Commit 50b1313

Browse files
Merge branch 'main' into mpokhylets/isolated-deinit
# Conflicts: # lib/SILGen/SILGenDistributed.cpp # lib/Sema/TypeCheckConcurrency.cpp
2 parents 66871b9 + 4fc85d7 commit 50b1313

File tree

1,548 files changed

+35034
-19020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,548 files changed

+35034
-19020
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
/include/swift/AST/DiagnosticsParse.def @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
7070
/include/swift/AST/Evaluator* @CodaFi @slavapestov
7171
/include/swift/Basic/ @DougGregor
72+
/include/swift/Basic/Features.def @DougGregor @hborla
7273
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder
7374
/include/swift/DependencyScan @artemcm
7475
/include/swift/Driver*/ @artemcm

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ body:
3333
attributes:
3434
label: Reproduction
3535
description: >
36-
Provide a test case, preferably in a Markdown codeblock, and explain
36+
Provide a test case, preferably in a Markdown code block, and explain
3737
how to build or run it to reproduce the problem.
3838
If the problem is a poor or unexpected diagnostic, fix-it, or other
3939
output, please show this output as is.

.github/ISSUE_TEMPLATE/crash-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body:
3434
attributes:
3535
label: Reproduction
3636
description: >
37-
Provide a test case, preferably in a Markdown codeblock, and explain
37+
Provide a test case, preferably in a Markdown code block, and explain
3838
how to build or run it to reproduce the problem. Consider reducing the
3939
test case to the smallest amount of code possible — a smaller test case
4040
is easier to reason about and more appealing to contributors.

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
33
> [!NOTE]
44
> This is in reverse chronological order, so newer entries are added to the top.
55
6+
## Swift (next)
7+
8+
* [SE-0442][]:
9+
TaskGroups can now be created without explicitly specifying their child task's result types:
10+
11+
Previously the child task type would have to be specified explicitly when creating the task group:
12+
13+
```swift
14+
await withTaskGroup(of: Int.self) { group in
15+
group.addTask { 12 }
16+
17+
return await group.next()
18+
}
19+
```
20+
21+
Now the type is inferred based on the first use of the task group within the task group's body:
22+
23+
```swift
24+
await withTaskGroup { group in
25+
group.addTask { 12 }
26+
27+
return await group.next()
28+
}
29+
```
30+
31+
632
## Swift 6.0
733

834
* Swift 6 comes with a new language mode that prevents the risk of data races
@@ -10586,6 +10612,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1058610612
[SE-0424]: https://github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
1058710613
[SE-0428]: https://github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md
1058810614
[SE-0431]: https://github.com/apple/swift-evolution/blob/main/proposals/0431-isolated-any-functions.md
10615+
[SE-0442]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0442-allow-taskgroup-childtaskresult-type-to-be-inferred.md
1058910616
[#64927]: <https://github.com/apple/swift/issues/64927>
1059010617
[#42697]: <https://github.com/apple/swift/issues/42697>
1059110618
[#42728]: <https://github.com/apple/swift/issues/42728>

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ include(CheckSymbolExists)
9393
include(CMakeDependentOption)
9494
include(CheckLanguage)
9595
include(GNUInstallDirs)
96-
include(SwiftImplicitImport)
96+
include(SwiftCompilerCapability)
9797
include(FetchContent)
9898

9999
# Enable Swift for the host compiler build if we have the language. It is
@@ -414,9 +414,9 @@ set(SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY
414414

415415

416416
if(BRIDGING_MODE STREQUAL "DEFAULT" OR NOT BRIDGING_MODE)
417-
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${SWIFT_HOST_VARIANT_SDK}" MATCHES "WINDOWS|ANDROID" OR (CMAKE_Swift_COMPILER AND CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.8))
417+
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS" OR (CMAKE_Swift_COMPILER AND CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.8))
418418
# In debug builds, to workaround a problem with LLDB's `po` command (rdar://115770255).
419-
# On Windows and Android, to workaround a build problem.
419+
# On Windows, to workaround a build problem.
420420
# If the host Swift version is less than 5.8, use pure mode to workaround a C++ interop compiler crash.
421421
set(BRIDGING_MODE "PURE")
422422
else()
@@ -682,7 +682,7 @@ option(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
682682

683683
option(SWIFT_ENABLE_EXPERIMENTAL_CXX_INTEROP
684684
"Enable experimental C++ interop modules"
685-
FALSE)
685+
TRUE)
686686

687687
option(SWIFT_ENABLE_CXX_INTEROP_SWIFT_BRIDGING_HEADER
688688
"Install the <swift/bridging> C++ interoperability header alongside compiler"
@@ -850,6 +850,10 @@ if (CMAKE_Swift_COMPILER)
850850
swift_supports_implicit_module("backtracing"
851851
SWIFT_SUPPORTS_DISABLE_IMPLICIT_BACKTRACING_MODULE_IMPORT)
852852
message(STATUS " Implicit 'backtracing' import: ${SWIFT_SUPPORTS_DISABLE_IMPLICIT_BACKTRACING_MODULE_IMPORT}")
853+
854+
swift_get_package_cmo_support(
855+
Swift_COMPILER_PACKAGE_CMO_SUPPORT)
856+
message(STATUS " Package CMO: ${Swift_COMPILER_PACKAGE_CMO_SUPPORT}")
853857
else()
854858
message(STATUS "Swift Compiler (None).")
855859
endif()
@@ -936,7 +940,7 @@ if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")
936940
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
937941
set(SWIFT_EXEC_FOR_SWIFT_MODULES "${CMAKE_Swift_COMPILER}")
938942
if(NOT SWIFT_EXEC_FOR_SWIFT_MODULES)
939-
message(WARNING "BOOSTRAPPING set to OFF because no Swift compiler is defined")
943+
message(WARNING "BOOTSTRAPPING set to OFF because no Swift compiler is defined")
940944
set(BOOTSTRAPPING_MODE "OFF")
941945
endif()
942946
elseif(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")

SwiftCompilerSources/Sources/Basic/Utils.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ public func precondition(_ condition: Bool, _ message: @autoclosure () -> String
5858
// Debugging Utilities
5959
//===----------------------------------------------------------------------===//
6060

61+
public func debugLog(prefix: Bool = true, _ message: @autoclosure () -> String) {
62+
let formatted = (prefix ? "### " : "") + message()
63+
formatted._withBridgedStringRef { ref in
64+
Bridged_dbgs().write(ref)
65+
}
66+
Bridged_dbgs().newLine()
67+
}
68+
6169
/// Let's lldb's `po` command not print any "internal" properties of the conforming type.
6270
///
6371
/// This is useful if the `description` already contains all the information of a type instance.

0 commit comments

Comments
 (0)