Commit Graph

195754 Commits

Author SHA1 Message Date
Charles Zablit
f7c4dd81b7 Merge pull request #85702 from charles-zablit/charles-zablit/update-checkout/add-status-command 2025-12-10 17:40:55 +00:00
susmonteiro
fb5bc7282f [cxx-interop] Diagnose invalid copyability, escapability and mutability attributes
Fixes: https://github.com/swiftlang/swift/issues/84559
2025-12-10 17:26:14 +00:00
Arnold Schwaighofer
d019f37b68 [embedded] Enable support for existentials/boxed protocol types per default
And enable this feature in production.
2025-12-10 08:50:23 -08:00
Max Desiatov
f9c064d161 Merge pull request #85844 from MaxDesiatov/wasm-build-instructions
docs: Add instructions for Wasm stdlib building and testing
2025-12-10 16:07:39 +00:00
Arnold Schwaighofer
be78127c23 Merge pull request #85923 from aschwaighofer/embedded_existentials_requires_embedded
[embedded] Feature::EmbeddedExistentials requires Feature::Embedded
2025-12-10 07:13:45 -08:00
Mishal Shah
0c0a98d591 Merge pull request #85943 from egorzhdan/egorzhdan/std-function-compile-error
[cxx-interop] Fix compile error
2025-12-10 06:59:10 -08:00
Arnold Schwaighofer
4730181c7a Merge pull request #85914 from aschwaighofer/embedded_foreign_type_metadata
[embedded] Add support for some foreign metadata
2025-12-10 06:58:55 -08:00
Pavel Yaskevich
2c9092486e Merge pull request #85939 from xedin/rdar-159408715
[Diagnostics] Don't attempt to synthesize arguments when destructurin…
2025-12-10 06:49:02 -08:00
Pavel Yaskevich
cb8d672511 Merge pull request #85873 from xedin/rdar-165862285
[CSRanking] Disambiguate static vs. instance method that used to be s…
2025-12-10 06:48:20 -08:00
Hamish Knight
28d637625a Merge pull request #85928 from hamishknight/overrun
[test] Add a couple more unterminated string delimiter test cases
2025-12-10 14:01:12 +00:00
Hamish Knight
63abfab670 Merge pull request #85738 from hamishknight/to-wit
[Frontend] Enforce an error was emitted for invalid conformance
2025-12-10 14:00:14 +00:00
Egor Zhdan
39d13c4093 [cxx-interop] Fix compile error
This fixes a compiler error introduced by ad56e061. The signature of `isMemberwiseInitializer()` changed after the CI ran on the PR.
2025-12-10 13:43:21 +00:00
Egor Zhdan
ad56e061af Merge pull request #85066 from egorzhdan/egorzhdan/std-function-context
[cxx-interop] Allow initializing `std::function` from Swift capturing closures
2025-12-10 13:35:34 +00:00
Slava Pestov
3dcd9bb011 Merge pull request #85938 from slavapestov/12-year-old-fixme-strikes-back
Sema: Tighten ridiculous disambiguation hack for overloaded type declarations
2025-12-10 06:53:43 -05:00
Slava Pestov
e7d2c163be Merge pull request #85933 from slavapestov/fix-ben-regression
Sema: Disambiguate some more bidirectional conversions
2025-12-10 06:53:01 -05:00
Tim Kientzle
313c4a6e77 Do not bother trying to run this test on watchOS 2025-12-10 09:06:53 +00:00
Slava Pestov
6701e5b39b Sema: Tighten ridiculous disambiguation hack for overloaded type declarations
We noticed that a project failed to build with prepared overloads enabled,
but built successfully with prepared overloads disabled.

It turns out that the code clearly should never have been accepted in the
first place, because the type checker was making an arbitrary choice between
two nominal type declarations with the same name.

Further inspection revealed this was because of a FIXME added in 2013 which
was far too broad. Tighten up the logic here to only disambiguate if at least
one of the two declarations is a type alias, and it has the same underlying
type as the other one. A choice between unrelated nominal type declarations
should always be ambiguous.

This still isn't perfect, because we might have two generic type aliases
that are referenced in both solutions with different substitution maps,
in which case we will still erroneously pick the first one. But this
is better than the old logic, at least.

Fixes rdar://165863775.
2025-12-09 22:48:12 -05:00
Saleem Abdulrasool
58035835d2 Merge pull request #85899 from compnerd/filename
DriverTool: adjust `argv[0]` scanning for CAS
2025-12-09 18:13:01 -08:00
Pavel Yaskevich
1f887202e1 [Diagnostics] Don't attempt to synthesize arguments when destructuring a single tuple argument results in an overrun
If arguments are represented by a single tuple it's possible
that the issue is not about missing parameters but instead
about tuple destructuring. Fix `fixMissingArguments` to check for
overruns after destructuring and stop if that produces more
arguments then parameters because such situations are better
diagnosed as a general conversion failure rather than a missing
argument(s) problem.

Resolves: rdar://159408715
2025-12-09 16:52:41 -08:00
Kyle Robson
f8f107f857 <rdar://165142180> fix immediate Task docs (#85626)
Co-authored-by: Kyle Robson <kyledr@apple.com>
2025-12-10 09:51:19 +09:00
Slava Pestov
d5c049ed69 Sema: Better debug output in compareSolutions() 2025-12-09 18:38:19 -05:00
Slava Pestov
f3e6b4ceda Sema: Disambiguate some more bidirectional conversions
This fixes an ambiguity introduced by the stdlib change in
0f99458900.

Since (borrowing T) -> () and (T) -> () both convert to
each other, we could end up with ambiguous solutions where
neither one was better than the other. Generalize the
existing trick we use for labeled vs unlabeled tuples to
also strip off ownership specifiers and @convention(...)
from function types. This fixes the regression, as well
an existing FIXME in a test I added a while ago where
the same problem arises with @convention(block).
2025-12-09 18:31:59 -05:00
Slava Pestov
5e952e9b22 Merge pull request #85902 from slavapestov/csbindings-cleanups
Sema: A few more simple CSBindings cleanups
2025-12-09 18:29:53 -05:00
Meghana Gupta
4089775de8 Fix swiftinterface printing of accessors and inferred lifetime dependencies when Lifetimes feature is enabled 2025-12-09 14:59:41 -08:00
Andrew Trick
f7c3c6f437 Fix InteriorUseWalker: consider partial_apply [on_stack] an escape
Fixes a bug in MandatoryDestroyHoisting where a captured value is destroyed
before a copy of the closure.

On-stack closures can be copied, and all copied uses must be within the borrow
scope of the captured operand. This is just like any other non-Escapable value,
so treat it as such by checking `Value.mayEscape` rather than `Type.Escapable`.

Originally, I wanted to make it illegal to copy of partial_apply [on_stack], but
it looks like we still allow it.

I would rather not complicate any logic yet with special handling for this
case. To fix any performance concerns, we might be able to simplify the
representation instead by banning copy_value on on-stack closures.

Fixes rdar://165850554 swift-frontend crash: While running "CopyPropagation" -
Invalid SIL provided to OSSACompleteLifetime?!)
2025-12-09 14:38:04 -08:00
Slava Pestov
1e9f8826a7 Sema: Split off Apple-specific parts of bidirectional_conversions.swift test 2025-12-09 17:35:04 -05:00
Ben Barham
8e06293dca Merge pull request #85875 from bnbarham/fix-up-userdocs
Fix up the userdocs index
2025-12-10 08:28:11 +10:00
Evan Wilde
b2797334eb CMake: StringProcessing: Embed Plist Sections
Generate and embed plists for StringProcessing libraries.

rdar://165944416
2025-12-09 13:39:36 -08:00
Alexis Laferrière
85d522e4c2 Merge pull request #85917 from xymus/exportability-nle-classes
Sema: Allow non-open class properties to reference hidden dependencies in non-library-evolution mode
2025-12-09 13:36:01 -08:00
John Hui
f1e2b7a07f Merge pull request #85723 from an0/my-branch
[ClangImporter] Fix NS_CLOSED_ENUM to validate raw values
2025-12-09 13:35:30 -08:00
Evan Wilde
1f9bdcadc2 CMake: StringProcessing: Catalyst support
Enable catalyst support in Apple StringProcessing builds
2025-12-09 13:34:29 -08:00
Augusto Noronha
47eda910c1 Merge pull request #85916 from augusto2112/speedup-protocols-main
[NFC][RemoteInspection] Use existing cache to build conformance table
2025-12-09 13:06:41 -08:00
Hamish Knight
d9222877e0 [test] Add a couple more unterminated string delimiter test cases 2025-12-09 21:02:55 +00:00
Hamish Knight
20bee09dc9 Merge pull request #85889 from hamishknight/overrun
[Parse] Fix buffer overrun in `advanceIfMultilineDelimiter`
2025-12-09 20:26:24 +00:00
Steven Wu
756e53967e [TEST-ONLY] Add utility to perform explicit module build
Add a script to build all dependencies for explicit module build in one
step. This reduces the boiling plate code needed to write a test for
explicit module build and allows the test to be more cross platform and
resilient to module dependencies changes.
2025-12-09 12:16:18 -08:00
Augusto Noronha
1627b5fc24 Merge pull request #85911 from augusto2112/factor-context-descriptor-symbol
[RemoteInspection] Factor out buildContextDescriptorManglingForSymbol
2025-12-09 11:24:53 -08:00
Arnold Schwaighofer
4d879967a7 [embedded] Feature::EmbeddedExistentials requires Feature::Embedded 2025-12-09 10:21:51 -08:00
Rick van Voorden
0ab8884657 add 6.4 symbols to abi tests 2025-12-09 09:35:34 -08:00
Eric Miotto
3bbd7da6e7 Merge pull request #85872 from edymtt/edymtt/android-build-builtin-float-before-math
CMake Android: ensure _Builtin_float is built before _math
2025-12-09 09:17:22 -08:00
Gábor Horváth
d97fa92a33 Merge pull request #85650 from Xazax-hun/refcounted-ptr-conversions
[cxx-interop] Introduce SWIFT_REFCOUNTED_PTR
2025-12-09 17:01:08 +00:00
Egor Zhdan
a6b30c4dd0 Merge pull request #85869 from egorzhdan/egorzhdan/remove-interop-compat-version
[cxx-interop] Remove compatibility versions
2025-12-09 15:45:00 +00:00
Tim Kientzle
3670162137 Disable unsupported configuration 2025-12-09 15:42:14 +00:00
Slava Pestov
3c4fef164e Sema: Add some LLVM_DEBUG output to CSBindings.cpp 2025-12-09 09:44:52 -05:00
Slava Pestov
25d9829af9 Sema: Remove incorrect usage of big-O notation from comment 2025-12-09 09:43:22 -05:00
Hamish Knight
f25b4b4fcc Merge pull request #85897 from hamishknight/retraction
[Demangler] Handle invertible reqs for extensions in `findDeclContext`
2025-12-09 14:32:55 +00:00
finagolfin
6d4931986f [autolink-extract] Update deduplication list for Observation (#85856)
All linux and Android CI show this being repeated many times, eg when
[building the Docc binary on the linux
CI](https://ci.swift.org/job/swift-PR-Linux-smoke-test/24247/consoleText):
```
"/home/build-user/build/buildbot_linux/unified-swiftpm-build-linux-x86_64/x86_64-unknown-linux-gnu/release/docc.build/main.swift.o" "-lswiftObservation" ... repeated many times ... "-lswiftObservation" "-lswiftCore"
```
2025-12-09 19:46:07 +05:30
Egor Zhdan
84e7f82363 Reapply "[ConstraintSystem] C++ Interop: Binding a string literal to std.string shouldn't increase the score"
This reverts commit 6852bc9834.

In addition to the original change, this makes sure that C++ `std::string` and Swift `String` are given distinct score, in order to prevent ambiguity which was causing build failures in some projects.

rdar://158439395
2025-12-09 12:55:18 +00:00
Tim Kientzle
a6e3f5535c Disable some unsupported test combinations 2025-12-09 09:31:24 +00:00
Tim Kientzle
2e56ce0b98 Minor perf tweak 2025-12-09 09:30:38 +00:00
Hamish Knight
0a8a3bc753 Merge pull request #85895 from hamishknight/fuzzy
[test] Add some more known crashers
2025-12-09 09:21:59 +00:00