Commit Graph

2221 Commits

Author SHA1 Message Date
Karoy Lorentey 285fd54fde Merge pull request #88900 from lorentey/bump-swift-version
Bump Swift version to 6.5
2026-05-11 18:28:56 -07:00
Karoy Lorentey da885c09e8 Bump Swift Compiler/Stdlib/Runtime version to 6.5 2026-05-06 16:21:38 -07:00
Allan Shortlidge cea706a03f AST: Improve InFlightDiagnostic::fixItRemove() heuristics.
If the fix-it would remove a range that is followed by a newline and the
remaining text on the line is empty or all whitespace then remove the entire
line. This produces better results when a fix-it removes an attribute that is
written on a line by itself.
2026-05-06 11:03:30 -07:00
Hamish Knight 769771c405 [test] Fix race in no-change-working-dir.swift
Make sure we do a semantic request after `open` to ensure the AST
has been built before sourcekitd-test exits.

rdar://171304680
2026-04-17 15:27:57 +01:00
Alexis Laferrière 1af6d6d28e Merge pull request #87353 from xymus/polyglot-ast-gen
ClangImporter: Services to parse Objective-C code and generate a `@objc @implementation` stub
2026-03-27 12:18:56 -07:00
Alexis Laferrière 31906d8bba IDE: Intro request to parse an ObjC implementation file and return AST
The new request in SourceKit allows to query this JSON format via the
usual SourceKit APIs. We use it here for testing but it can be
integrated in a client as needed.
2026-03-25 11:36:15 -07:00
Steven Wu 12f8d9c6c9 [TEST] Switch to use new swift-driver when running tests
Default to use new swift-driver to run lit tests as legacy swift driver
is deprecated for a long time. The lit tests for legacy drivers are also
disable when running new swift-driver.

Tests that relies on legacy swift driver (for example, tests merge
module) can be enabled on conditions `legacy_swift_driver`. Fix and
split up some existing tests that relies on legacy driver.
2026-03-23 09:48:45 -07:00
Doug Gregor 20e65b713e Merge pull request #84474 from DougGregor/stdlib-swiftsourceinfo
Build and install .swiftsourceinfo files for the standard library + friends
2026-03-18 21:56:38 -07:00
Aviva Ruben 2f58b7c57a [Sema] Preserve type alias sugar when removing escaping
This change fixes rdar://172417385 and #45125 by using transformRec
to set no escape, instead of casting which drops sugar. This affects
how interfaces are printed, and could theoretically cause issues with
printing private aliases into public interfaces. Motivated by needing
to be able to diagnose issues with attributes on aliases; without this
change, the alias sugar is sometimes lost.
2026-03-17 11:33:58 -07:00
Doug Gregor c261a1db0d Minor fixes to deal with the presence of .swiftsourceinfo for the Swift standard library 2026-03-11 10:58:04 -07:00
Hamish Knight 451f7df952 [Sema] Fix type-checker assertion for SourceKit
We ought to properly fix this, but for now let's avoid asserting for
SourceKit.
2026-03-08 00:19:10 +00:00
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