2210 Commits

Author SHA1 Message Date
Karoy Lorentey
a88b55196d Bump Swift version to 6.4 (#87511)
`compiler(>=)` is the simplest/best way to write code that needs to only
be built on a particular toolchain version. For that to work, we cannot
have the `main` branch report itself as the same version as
`release/6.3`; accordingly, bump the compiler version number to 6.4.

(The Swift Standard Library already reports itself as 6.4. If the `main`
branch ends up shipping under some other Swift version, then we can
simply update this as needed, like we did with 5.11 → 6.0.)

---------

Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>
2026-03-02 09:16:14 -08:00
Anthony Latsis
6b663dd400 test: Delete a stale forever-XFAILed test
This test has been XFAILed since 2016 despite merely missing an error
expectation. However, given that the obsoleted pre-Swift-3 metatype
syntax tested here has not had a tailored compatibility diagnostic since
at least Swift 3 (the compiler), I do not think it carries its weight.

Resolves rdar://16172507.
2026-02-24 14:46:29 +00:00
Becca Royal-Gordon
1f008fb0d0 [ModuleInterface] Enable module selectors by default
And update tests to use them.

This commit depends on fixes in swiftlang/swift PRs #86905, #87129, and #87130.

Fixes rdar://169749886.
2026-02-20 00:35:23 -08:00
Henrik G. Olsson
f853564db4 Merge pull request #87131 from hnrklssn/swiftify-enable-subset
[Swiftify] enable safe interop by default
2026-02-11 23:31:32 -08:00
Henrik G. Olsson
d480ea3eee [Swiftify] replace StabilizedSafeInteropWrappers with -disable-safe-interop-wrappers
swift-synthesize-interface needs to match the safe interop wrappers
setting of the compiler invocation that built the Swift module, but
doesn't have -enable/disable-experimental-feature options. Instead of
introducing them for a single feature, which isn't even experimental,
this introduces the -disable-safe-interop-wrappers instead.
2026-02-11 09:32:03 -08:00
Henrik G. Olsson
b39aa89e48 [Swiftify] enable safe interop by default
This enables the stable subset of safe interop wrappers by default. It
can be manually disabled using
`-disable-experimental-feature StabilizedSafeInteropWrappers`.

rdar://148994016
2026-02-10 16:52:34 -08:00
Henrik G. Olsson
87a70f60d0 [Swiftify] add safe wrappers flag that ignores lifetimebound
lifetimebound does not imply that the parameter does not escape. For
stabilising safe wrappers we don’t want to use that assumption, so we
need a new feature flag.

rdar://170090534
2026-02-10 16:51:35 -08:00
Hamish Knight
3b5c77be34 [test] Enforce working directory doesn't change in sourcekitd-test 2026-02-09 09:46:34 +00:00
Hamish Knight
2c9ad66cf9 [test] Merge two SourceKit tests
I missed this when I originally added the test, we already have a test
file for this.
2026-02-09 09:46:34 +00:00
Gábor Horváth
18961b169f Merge pull request #87002 from Xazax-hun/objc-method-locs-imported
[cxx-interop] Import the locations of ObjC methods
2026-02-07 00:36:10 +00:00
Henrik G. Olsson
0a744979ca Merge pull request #86927 from ramonasuncion/remove-shell-index-compress
[Test] Replace REQUIRES: shell with UNSUPPORTED: OS=windows-msvc
2026-02-06 09:39:29 -08:00
Gabor Horvath
2c03085d2e [cxx-interop] Import the locations of ObjC methods
We did not import the source locations for ObjC methods properly but had
some workarounds in place for diagnostics.

rdar://158977633
2026-02-06 11:29:48 +00:00
Ramon Asuncion
8c4371fe42 [Test] Add TODO to try making disabled tests work on Windows 2026-02-06 02:04:34 -05:00
Henrik G. Olsson
6021a238f5 Merge pull request #86497 from ramonasuncion/fix-match-module-cache-lit
[Test][SourceKit] Fix match-module-cache-with-compiler.swift for lit
2026-02-02 13:19:34 -08:00
Ramon Asuncion
5dea047d5e [Test][SourceKit] Use lit DEFINE directive for shared compiler args 2026-02-02 11:21:20 -05:00
Ramon Asuncion
575e71d608 [Test][SourceKit] Attach issue to match-module-cache-with-compiler.swift
Co-authored-by: Henrik G. Olsson <hnrklssn@gmail.com>
2026-02-02 00:33:22 -05:00
Ramon Asuncion
ae16863916 [Test] Replace REQUIRES:shell with UNSUPPORTED: OS=windows-mscv 2026-02-01 20:56:50 -05:00
Henrik G. Olsson
f0677a67f5 Merge pull request #86494 from ramonasuncion/complete-checkdeps-remove-shell2
[Test][SourceKit] Use lit DEFINE directive for compiler args in checkdeps tests
2026-01-30 12:51:44 -08:00
Ramon Asuncion
276c7088c9 [Test][SourceKit] Remove extra find_files line 2026-01-29 21:32:05 -05:00
Ramon Asuncion
674a82817c [Test][SourceKit] Add UNSUPPORTED windows-mscv to match-module-cache-with-compiler.swift 2026-01-29 21:31:26 -05:00
Ramon Asuncion
85ac5ef506 [Test][SourceKit] Remove REQUIRES: shell from no-driver-outputs 2026-01-29 15:49:59 -05:00
Ramon Asuncion
f7ab493484 [Test][SourceKit] Use lit DEFINE directive for shared compiler args 2026-01-29 15:23:13 -05:00
Ramon Asuncion
fe520d96b5 [Test][SourceKit] Use lit DEFINE directive for compiler args in match-module-cache-with-compiler 2026-01-29 14:04:04 -05:00
Henrik G. Olsson
97038a1fb8 Merge pull request #86488 from ramonasuncion/complete-checkdeps-remove-shell
[Test][SourceKit] Remove REQUIRES shell directive
2026-01-28 16:16:37 -08:00
Ramon Asuncion
349fadf933 [Test][SourceKit] Fix match-module-cache-with-compiler.swift on Windows 2026-01-15 09:19:51 -05:00
Hamish Knight
aa317b37e7 [test] Silence output from doc_stdlib.swift 2026-01-14 22:46:41 +00:00
Ramon Asuncion
a4691fd25b [Test][SourceKit] Remove tee from complete_checkdeps_vfs_open.swift for Windows 2026-01-14 13:25:55 -05:00
Ramon Asuncion
0ee2c0d75d [Test][SourceKit] Use cross-platform find_files for PCM detection 2026-01-14 07:58:13 -05:00
Ramon Asuncion
d47de5827d [Test][SourceKit] Fix UNSUPPORTED directive placement in checkdeps tests 2026-01-14 07:37:52 -05:00
Ramon Asuncion
12f33654b6 [Test][SourceKit] Skip checkdeps bridging test on Windows 2026-01-13 06:20:06 -05:00
Ramon Asuncion
363f79a83e [Test][SourceKit] Use %{fs-sep} for cross-platform VFS paths 2026-01-13 06:04:43 -05:00
Ramon Asuncion
b0a55edc31 [Test][SourceKit] Inline COMPILER_ARGS and remove shell REQUIRES 2026-01-12 17:52:19 -05:00
Ramon Asuncion
e8d629088a [Test][SourceKit] Inline COMPILER_ARGS in checkdeps tests (part 2) 2026-01-12 16:29:45 -05:00
Ramon Asuncion
77efbb547d [Test][SourceKit] Inline COMPILER_ARGS and remove shell REQUIRES
Inlines bash array and variable expansion in checkdeps tests for
internal shell compatibility
2026-01-12 16:18:49 -05:00
Ramon Asuncion
353513cf94 [Test][SourceKit] Remove REQUIRES shell directive 2026-01-12 14:04:42 -05:00
Hamish Knight
f0d4572a92 [SourceKit] Always check buffer in SemanticAnnotator
Make sure we don't ever try to record semantic tokens for a different
buffer. This works around an ASTWalker issue where it will walk macro
expanded bodies even in non-macro-expansion mode.

rdar://165420658
2025-12-10 17:41:00 +00:00
Ben Cohen
58f661cfba Allow Equatable: ~Escapable (#85854)
Adds `~Escapable` to #85746
2025-12-08 09:50:50 -08:00
Ben Cohen
fbb420f38d Allow Equatable: ~Copyable (#85746)
Under review
[here](https://forums.swift.org/t/se-0499-support-copyable-escapable-in-simple-standard-library-protocols/83297).
Multi-part version of #85079.
2025-12-03 05:45:38 -08:00
Hamish Knight
c717e42af4 [test] Add some already-fixed crashers 2025-12-01 09:12:15 +00:00
Hamish Knight
c7e9809480 [IDE] Mangle USRs using API decls rather than ABI decls
For semantic functionality the API decl is the more useful thing to
mangle, and redeclaration checking ensures we can't end up with
conflicts. This ensures we're able to perform a name lookup for the
decl based on its USR without having to maintain a separate lookup 
table for ABI names.
2025-10-23 09:11:17 +01:00
Hamish Knight
6f1417135b [SourceKit] Fix handling of @abi in AnnotatingPrinter
Make sure we avoid adding these to the entity stack entirely, which
avoids hitting the assertion that a top-level entity isn't encountered
with a non-empty stack.
2025-10-23 09:11:17 +01:00
Henrik G. Olsson
3266b5f4a6 Merge pull request #84774 from hnrklssn/fix-std-span-linux
Fix std::span tests on linux
2025-10-20 16:06:35 -07:00
Henrik G. Olsson
c844d483ff [cxx-interop] Add llvm-lit feature 'std_span'
This adds a check in lit.local.cfg for whether the current C++ stdlib
contains the 'span' header. If so, the llvm-lit feature 'std_span' is
set. Also adds 'REQUIRES: std_span' to interop tests that include
'span'. This means we no longer have to choose between blanket disabling
`std::span` tests on all Linux distributions, or listing every Linux
distro with a libstdc++ version without `std::span` support as
unsupported.

I couldn't find any existing path to the MSVC stdlib in lit, and we
don't test versions of MSVC old enought to not support std::span
anyways, so 'std_span' is unconditionally enabled when targeting
windows-msvc.

rdar://161999160
rdar://161999174
rdar://162106580
rdar://162106619
rdar://162106643
rdar://162106653
rdar://162106722
rdar://162106747
2025-10-17 15:41:26 -07:00
Henrik G. Olsson
9e2a18d401 fix tests with TMP_DIR 2025-10-12 16:01:30 -07:00
Egor Zhdan
62d388a09f Merge pull request #84435 from egorzhdan/egorzhdan/do-not-generate-interface-twice
[cxx-interop] Avoid trying to generate module interfaces twice
2025-10-07 17:50:11 +01:00
Hamish Knight
a7dd04ed6f Merge pull request #84403 from a7medev/refactor/signature-help-to-ide
[IDE] Move signature help formatting to IDE instead of SourceKit
2025-09-29 14:05:02 +01:00
Egor Zhdan
a610bcd752 [cxx-interop] Avoid trying to generate module interfaces twice
This reverts most of 72050c5385, which led to decreased performance of jump-to-definition.

Instead of re-attempting to generate a module interface with C++ interop enabled, Swift should rely on the IDE to pass the correct `-cxx-interoperability-mode=` value to SourceKit.

rdar://149061322
2025-09-22 18:48:20 +01:00
Hamish Knight
0bfbe987b4 [AST] Print ErrorType as _
In preparation for removing UnresolvedType in favor of ErrorType,
start printing ErrorType as `_` unless we've enabled debug printing.
`<<error type>>` should never be presented to the user, instead `_`
now just consistently means "unknown type".
2025-09-21 23:19:06 +01:00
Henrik G. Olsson
7fcc72f108 Merge pull request #81859 from swiftlang/swiftify-inherit-imports
[MacrosOnImports][Swiftify] Copy module imports from clang node's module to its Swift macro SourceFile
2025-09-19 21:21:09 -07:00
Ahmed Mahmoud
979ccd1f50 [Test] Use swift-ide-test for signature help tests 2025-09-19 21:03:05 +03:00