Skip to content

build: enable DocC integration via CMake - #2772

Open
compnerd wants to merge 4 commits into
swiftlang:mainfrom
compnerd:docc
Open

compnerd wants to merge 4 commits into
swiftlang:mainfrom
compnerd:docc

Conversation

@compnerd

Copy link
Copy Markdown
Member

This pull request updates the build configuration for SourceKit-LSP to add support for a new DocumentationLanguageService and modernizes the CMake setup. The most important changes include introducing a new documentation service library, updating Swift language and CMake requirements, and cleaning up how language services are registered.

Build system modernization:

  • Updated CMakeLists.txt to require CMake 3.29, set Swift language version to 6, and add new Swift compiler options for upcoming features. Also, copyright and license headers were added.
  • Moved Swift compiler options and the RESILIENT_LIBRARIES definition from Sources/CMakeLists.txt to the top-level CMakeLists.txt for centralization and clarity. [1] [2]

Documentation language service integration:

  • Added a new DocumentationLanguageService static library with its own CMake configuration, including all necessary source files and dependencies such as SwiftDocC and DocCCommon.
  • Registered DocumentationLanguageService as a dependency of InProcessClient and as a statically known service for Markdown, tutorial, and Swift file types, removing the previous conditional import logic. [1] [2]

Dependency updates:

  • Added find_package(SwiftDocC CONFIG REQUIRED) to ensure the documentation compiler is available during build.

These flags are applied to the entire package, so hoist to the top
level.
Add the missing module to enable coverage; remove the conditional
wrapping here as both SPM and CMake now enable the DocC integration.

@ahoppen ahoppen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for driving this, @compnerd and finally enabling DocC on Windows. Looks good to me assuming this builds but would also like to hear @rintaro’s opinion before merging.

@rintaro rintaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks!

@compnerd

compnerd commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

@swift-ci please test

@compnerd

compnerd commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

Bleh, this won't build, its missing one change to build.ps1 (to pass the path). I'll upload that in a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants