Skip to content
Success

Changes

Summary

  1. Make `failed_to_produce_diagnostic` non-fatal (details)
  2. Remove `diag::type_of_expression_is_ambiguous` (details)
  3. Promote LifetimeDependenceMutableAccessors and InoutLifetimeDependence to language features (details)
  4. Restrict existential test to just built (details)
  5. [Embedded] Introduce a test for @_implementationOnly + @_neverEmitIntoClient (details)
  6. Improve differentiableMap vjp performance (#83807) (details)
Commit a554080a82f4a64aa11796254915edc0258793ea by hamish_knight
Make `failed_to_produce_diagnostic` non-fatal
The file was modified include/swift/AST/DiagnosticsSema.def (diff)
Commit 5c3f6703a052d2806e91ff9811be3ed74f906334 by hamish_knight
Remove `diag::type_of_expression_is_ambiguous`

This is a diagnostic that is only really emitted as a fallback when
the constraint system isn't able to better diagnose the expression.
It's not particulary helpful for the user, and can be often be
misleading since the underlying issue might not actually be an
ambiguity, and the user may well already have a type annotation. Let's
instead just emit the fallback diagnostic that we emit in all other
cases, asking the user to file a bug.
The file was modified test/Concurrency/sendable_keypaths.swift (diff)
The file was modified test/decl/protocol/existential_member_access/concrete.swift (diff)
The file was modified test/expr/unary/if_expr.swift (diff)
The file was modified test/Sema/issue-74858.swift (diff)
The file was modified test/Constraints/variadic_generic_constraints.swift (diff)
The file was modified test/decl/var/property_wrappers_invalid.swift (diff)
The file was modified test/Sema/discard.swift (diff)
The file was modified test/Interop/Cxx/namespace/import-as-member-typechecker.swift (diff)
The file was modified test/Interop/Cxx/foreign-reference/not-any-object.swift (diff)
The file was modified test/Interop/Cxx/namespace/inline-namespace-function-call-broken.swift (diff)
The file was modified test/type/implicit_some/opaque_parameters.swift (diff)
The file was modified test/type/opaque_parameters.swift (diff)
The file was modified test/Constraints/operator.swift (diff)
The file was modified lib/Sema/ConstraintSystem.cpp (diff)
The file was modified include/swift/AST/DiagnosticsSema.def (diff)
The file was modified test/Constraints/parameterized_existentials.swift (diff)
The file was modified test/Constraints/keypath.swift (diff)
The file was modified test/Constraints/rdar85263844_swift6.swift (diff)
The file was modified test/expr/postfix/init/unqualified.swift (diff)
The file was modified test/expr/unary/switch_expr.swift (diff)
The file was modified test/expr/unary/keypath/keypath.swift (diff)
Commit 9f435ad5bd145b8a26c0fb16b967a4fd3e6317a3 by meghana_gupta
Promote LifetimeDependenceMutableAccessors and InoutLifetimeDependence to language features

These were added to guard specific source code in swift interface files for older compilers.
They do not guard any experimental language feature specifically.
Turn them on by default to prevent unnecessary flags developers need to add in their configs.
The file was modified include/swift/Basic/Features.def (diff)
Commit 9b67867dbbfa72ca606688b69e163305dd128acd by alejandro_alonso
Restrict existential test to just built
The file was modified test/Interpreter/extended_existential.swift (diff)
Commit ae8e95d5d9263e2eae5a450cc0b0f831b4ff4139 by dgregor
[Embedded] Introduce a test for @_implementationOnly + @_neverEmitIntoClient

In Desktop Swift, @_implementationOnly imports allow one to hide the
implementation so long as you're careful to only reference entities
from the imported modules in code that gets compiled into the object
file and *not* referenced by the corresponding Swift module file.

Until very recently, there was no such affordance for Embedded Swift,
because all functions would have their SIL serialized to the Swift
module file. Using them from a client module would then attempt to
deserialize the SIL, loading the @_implementationOnly-imported module
and causing the compiler to abort. With the introduction of
@_neverEmitIntoClient, we now have a way to say "only in the object
file, never in the module file" for the definition of functions.

Introduce a test that makes sure @_implementationOnly +
@_neverEmitIntoClient has the desired effect of hiding the imported
modules from clients. It's still brittle and hard to use, just like
the existing @_implementationOnly, but this shows that it's at least
possible to do this implementation hiding in Embedded Swift.
The file was addedtest/embedded/linkage/implementation_only_hiding.swift
The file was addedtest/embedded/linkage/Inputs/CHeader.h
The file was addedtest/embedded/linkage/Inputs/module.modulemap
The file was addedtest/embedded/linkage/Inputs/SwiftDependency.swift
Commit a5ef5fe2264b80da4a318298f41cd97c31625f21 by github
Improve differentiableMap vjp performance (#83807)

Improve differentiableMap vjp performance by reserving capacity for the values and pullbacks arrays.
The file was modified stdlib/public/Differentiation/ArrayDifferentiation.swift (diff)

Summary

  1. Allow multiple language services to handle a single document (details)
  2. Stop launching language service for a language if one fails (details)
  3. Handle documentation requests for Swift files in `DocumentationLanguageService` (details)
  4. Make `LanguageService` initializer non-failable (details)
Commit 0e75e951d3095e3c48db05989e13654c7fd84fe0 by ahoppen
Allow multiple language services to handle a single document

This allows us to implement all of `doccDocumentation` in `DocumentationLanguageService`. `DocumentationLanguageService` will be a secondary language service for Swift files and can also provide the docc documentation support that’s currently in `SwiftLangaugeService`.
The file was modified Tests/SourceKitLSPTests/CrashRecoveryTests.swift (diff)
The file was modified Sources/SourceKitLSP/LanguageServiceRegistry.swift (diff)
The file was modified Sources/SourceKitLSP/Rename.swift (diff)
The file was modified Sources/DocumentationLanguageService/DoccDocumentationHandler.swift (diff)
The file was modified Sources/SourceKitLSP/TestDiscovery.swift (diff)
The file was modified Tests/SourceKitLSPTests/LocalSwiftTests.swift (diff)
The file was modified Sources/LanguageServerProtocol/Error.swift (diff)
The file was modified Sources/SourceKitLSP/SyntacticTestIndex.swift (diff)
The file was modified Sources/SourceKitLSP/SourceKitLSPServer.swift (diff)
The file was modified Tests/SourceKitLSPTests/ClangdTests.swift (diff)
The file was modified Tests/SourceKitLSPTests/LocalClangTests.swift (diff)
The file was modified Sources/DocumentationLanguageService/DocumentationLanguageService.swift (diff)
The file was modified Sources/SourceKitLSP/Workspace.swift (diff)
Commit ab47ef9cb58c03f044b7e426c76029c6eb6d7121 by ahoppen
Stop launching language service for a language if one fails

If a language service fails to start, don't try starting language services with lower precedence. Otherwise we get into a situation where eg. `SwiftLanguageService`` fails to start (eg. because the toolchain doesn't contain sourcekitd) and the `DocumentationLanguageService` now becomes the primary language service for the document, trying to serve documentation, completion etc. which is not intended.
The file was modified Sources/SourceKitLSP/SourceKitLSPServer.swift (diff)
Commit 22fae21153f7d5471f4fffad52a6d50059fe08a4 by ahoppen
Handle documentation requests for Swift files in `DocumentationLanguageService`

This cleanly separates the responsibilities for handling documentation from those of handling Swift files. It also simplifies providing docc support for clang because we just need to implement the two `symbolGraph` methods in `ClangLanguageService` and can re-use the remaining infrastructure from `DoccLanguageService`.
The file was modified Sources/SourceKitLSP/LanguageService.swift (diff)
The file was modified Sources/SwiftLanguageService/SymbolGraph.swift (diff)
The file was modified Sources/InProcessClient/LanguageServiceRegistry+staticallyKnownServices.swift (diff)
The file was modified Sources/DocumentationLanguageService/DoccDocumentationHandler.swift (diff)
The file was modified Sources/DocumentationLanguageService/DocumentationLanguageService.swift (diff)
The file was modified Sources/ClangLanguageService/ClangLanguageService.swift (diff)
The file was modified Sources/SwiftLanguageService/DoccDocumentation.swift (diff)
Commit 08faa197af5b3dc8dc8202dfe325fba07e97c31c by ahoppen
Make `LanguageService` initializer non-failable
The file was modified Sources/DocumentationLanguageService/DocumentationLanguageService.swift (diff)
The file was modified Sources/SourceKitLSP/SourceKitLSPServer.swift (diff)
The file was modified Sources/ClangLanguageService/ClangLanguageService.swift (diff)
The file was modified Sources/SourceKitLSP/LanguageService.swift (diff)
The file was modified Sources/SwiftLanguageService/SwiftLanguageService.swift (diff)