GSoC 2026 Showcase

The Swift project once again participated in Google Summer of Code in 2026, pairing newcomers to open source with mentors to build new features for Swift and its ecosystem.

This year, we ran three projects, all of which were completed successfully:

  • DocC language features in SourceKit-LSP
  • Task and TaskGroup tracking for Swift Concurrency
  • Qualified name lookup for swift-syntax

Here’s a short summary of each project, with links to the full writeups.

DocC Language Features in SourceKit-LSP

DocC is Swift’s documentation compiler. It turns the doc comments in your code, along with Markdown articles and tutorials, into browsable documentation. Inside those comments and files, a symbol link points to a type, function, or property in your code, so readers can jump straight to it:

/// A type that greets people by name.
///
/// Call ``greet(_:)`` to produce a greeting, or use
/// ``Greeter/defaultName`` when no name is available.
struct Greeter {
    static let defaultName = "World"

    func greet(_ name: String) -> String {
        "Hello, \(name)!"
    }
}

Before this project, editors had no awareness of these links, so you had to find the referenced symbol by hand. DocC Markdown files also had no syntax highlighting.

Padmashree extended SourceKit-LSP, Swift’s language server, to understand DocC, so editors can help while you write documentation:

  • Go to definition for symbol links in doc comments, Markdown, and tutorial files
  • Clickable symbol links in the DocC preview that jump to the definition in your editor
  • Syntax highlighting for DocC Markdown and tutorial files

Because these features are implemented in SourceKit-LSP, they aren’t limited to a single editor. They work in any editor that supports the Language Server Protocol (LSP), such as VS Code or Vim.

Task and TaskGroup Tracking for Swift Concurrency

Programs in Swift use tasks to execute multiple things concurrently. Those tasks may be in different states, like actively running, sleeping, or waiting on another task to complete.

Previously, the Swift runtime did not have a registry of active tasks that was possible to query a process for, and e.g. use it to detect “stuck” tasks, which made diagnosing these problems difficult.

Ege’s project focused on implementing a high-performance, always-on registry that allows the concurrency runtime to track tasks in a process.

Debuggers like lldb and other tools, including swift-inspect, can read this registry and offer developers valuable insights about the activity of tasks in their programs.

Since every task creation and teardown touches the registry, the design focused on minimal performance impact to existing code. To avoid false sharing, the registry is split into 64 independent lists, or shards.

In a stress test modeled on a web server that spawned over 600,000 tasks in a short burst, tracking them added about 0.015 seconds to a 0.37-second run; you can read a more detailed analysis in Ege’s writeup.

Qualified Name Lookup for swift-syntax

Swift macros, linters, and code generators built on swift-syntax could read the structure of Swift code, but they couldn’t easily perform contextual lookups.

For tool developers, getting those answers meant relying on libraries outside swift-syntax, or hand-rolling lookup themselves, which is a difficult task to get right.

Filip added qualified name lookup to swift-syntax’s SwiftLexicalLookup module. It builds on the GSoC 2024 project that introduced lexical scopes and unqualified name lookup, which already powers features in swift-java. Qualified lookup can be tricky to get right, as the example below illustrates:

struct MyView { // <- In `struct MyView {}`, find members named 'model'
  #if true
  var model: Model // <- In type 'Model', find members named 'sayHi()'
  #endif
}
extension MyView {
  typealias Model = MyModel
}
final class MyModel {
  func sayHi() { print("Hi") }
}

In this example, we need to process extensions of the type MyView in order to discover that the Model type spelled inside MyView actually refers to the MyModel class, through the typealias Model defined in the extension below the MyView definition. Implementing these kinds of lookups manually is very difficult, and we’re excited to have this functionality built into swift-syntax!

Thank you

It’s always a pleasure to work with contributors and see their projects help Swift be more successful. Thank you to the contributors, mentors, and everyone else who offered help and support during this year’s projects!

Want to see more? Explore projects from previous years, and find out how to take part in future ones, on Swift’s Google Summer of Code page.


Authors

Konrad is part of the Swift language team and Swift on Server Workgroup, where he works on language and runtime features with particular interest in supporting server and distributed computing use-cases, and expanding the Swift ecosystem.
Sam is a contributor to Swift Package Manager and is a member of the Contributor Experience Workgroup, where he helps organize the Swift Google Summer of Code program.

Continue Reading