Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
b9c4b50
corrects schema version property name in RenderIndex.spec.json (#1224)
heckj Jun 17, 2025
b76e07f
Don't omit "Type" suffix from disambiguation for Swift metatypes (#1230)
d-ronnqvist Jun 17, 2025
9c91d10
Omit whitespace from suggested link completion disambiguations (#1232)
d-ronnqvist Jun 17, 2025
cd4c34c
Don't remove leading and trailing parentheses for closure types in ty…
d-ronnqvist Jun 17, 2025
6fa695d
Fix warnings in Swift 6.2 about non-sendable types in isolated closur…
d-ronnqvist Jun 17, 2025
c7660bb
Fix false positive curation for article links with extra path compone…
d-ronnqvist Jun 26, 2025
65aaf92
Support external links in the navigator (#1247)
anferbui Jul 15, 2025
8902856
enforce overload declaration ordering when computing the highlighted …
QuietMisdreavus Jul 23, 2025
1b4a185
optionalRequirementOf relationships take precedence over non-optional…
QuietMisdreavus Jul 23, 2025
8cba153
RenderNodeTranslator.visitSymbol filters out availability items with …
patshaughnessy Jul 28, 2025
361a9f8
sort platform-specific declarations by their platforms (#1254)
QuietMisdreavus Jul 28, 2025
01cdb27
add initializer to LinkCompletionTools.SymbolInformation that accepts…
matthewbastien Jul 29, 2025
4f207a4
Update DocumentationContext initializer to be async (#1244)
d-ronnqvist Jul 30, 2025
71032cd
Add a utility to update the years in license comments of modified fil…
d-ronnqvist Aug 1, 2025
1e69ac1
prefer longer doc comments when selecting commented symbols (#1258)
QuietMisdreavus Aug 1, 2025
69f27f2
sort Default Implementations section contents when rendering (#1272)
QuietMisdreavus Aug 6, 2025
1a01b54
Add yml to table of supported langs for syntax highlighting. (#1270)
mportiz08 Aug 7, 2025
caeef6b
Generate concurrency-safe code in test bundle (#1274)
snprajwal Aug 8, 2025
7a3058b
Fix single "Objective-C" typo in developer facing documentation (#1259)
d-ronnqvist Aug 11, 2025
ea5c14a
Remove miscellaneous unused test code (#1262)
d-ronnqvist Aug 11, 2025
9b57249
Remove unused private code from the symbol graph loader (#1263)
d-ronnqvist Aug 11, 2025
9f464bc
Remove unused internal properties (#1264)
d-ronnqvist Aug 11, 2025
49c6c22
Remove unused property and parameter from generated doc topic code (#…
d-ronnqvist Aug 11, 2025
4a871f8
Formalize LinkCompletionTools as public API (#1267)
d-ronnqvist Aug 11, 2025
a4b9902
Fix warnings about retroactive conformance to protocols in 'generate-…
d-ronnqvist Aug 15, 2025
9cd9bc3
Add solutions to remove invalid metadata directives in documentation …
agisilaos Aug 19, 2025
2cff0b0
[docs] Add basic documentation on using Snippets to DocC documentatio…
heckj Aug 21, 2025
5ba1436
[Tests] NFC: Disable a test that is causing CI failures (#1288)
xedin Sep 3, 2025
64418aa
Avoid using legacy test data in most (but not all) SymbolTests tests …
d-ronnqvist Sep 15, 2025
0238525
Remove API that was deprecated during the 6.1 release (#1266)
d-ronnqvist Sep 15, 2025
1c54e10
Support beta status in navigator (#1249)
anferbui Sep 15, 2025
3268e73
Populate symbol kind in external render nodes (#1251)
anferbui Sep 15, 2025
083a311
Ignore all build dirs in `bin/check-source` (#1291)
snprajwal Sep 17, 2025
3c67f9a
Avoid expecting too many near miss suggestions (#1293)
d-ronnqvist Sep 22, 2025
1d1ebbe
Update the Swift tools version to 6.0 (#1268)
d-ronnqvist Sep 24, 2025
9413c59
Add a new version of the communication protocol between DocC and exte…
d-ronnqvist Sep 24, 2025
257c62d
Revert "Add a new version of the communication protocol between DocC …
kavon Sep 25, 2025
163fd03
Revert #1299 (#1300)
d-ronnqvist Sep 26, 2025
f0a3e95
Populate abbreviated declaration fragments in external render nodes (…
anferbui Sep 26, 2025
5ed689d
Update the bin/benchmark script to Swift 6 (#1297)
d-ronnqvist Sep 26, 2025
41bc4c4
Avoid a few possible unnecessary copies in low level implementation d…
d-ronnqvist Sep 26, 2025
527558e
Improve handling of snippet symbol graph files (#1302)
d-ronnqvist Sep 29, 2025
3dc6dd0
Fix test that became flaky after recent snippets change (#1308)
d-ronnqvist Sep 29, 2025
cf6dde1
Adopt typed throws to provide callers with more information about pos…
d-ronnqvist Sep 29, 2025
bb2cdc7
Fix error when merging a single archive (#1218)
ffried Oct 1, 2025
7f0d3f6
Add copy-to-clipboard support for code blocks (with 'nocopy' annotati…
DebugSteven Oct 3, 2025
82cc6c8
Only curate external non-symbols in different lang (#1269)
snprajwal Oct 6, 2025
c1baea3
Add experimental code block options: highlight, strikeout, wrap, show…
DebugSteven Oct 7, 2025
f982c41
Update deprecation messages to give the API a full minor release befo…
d-ronnqvist Oct 7, 2025
eeabad0
Add a bit more public API documentation about the V2 communication pr…
d-ronnqvist Oct 7, 2025
c5f99a2
Fix missing platforms in declaration fragments (#1314)
RalucaP Oct 8, 2025
eb5ba13
Remove redundant "bundle" parameters where a context is also availabl…
d-ronnqvist Oct 10, 2025
8a48674
Add documentation about recommended aspect ratios for @PageImage (#1317)
d-ronnqvist Oct 10, 2025
a1a8f7c
Add missing comma in tutorial article (#1316)
d-ronnqvist Oct 10, 2025
37d2f51
Use parenthesis instead of comma for examples inside an already comma…
d-ronnqvist Oct 10, 2025
5f905e4
Update 42 tests to stop using the "LegacyBundle_DoNotUseInNewTests" f…
d-ronnqvist Oct 15, 2025
44f3997
Fix `@SupportedLanguage` directive for articles (#1318)
snprajwal Oct 15, 2025
57c60f3
Omit the "doc://" and identifier prefix from V2 `link(_:)` requests (…
d-ronnqvist Oct 16, 2025
55fbcce
Avoid full URL parsing to trim a known prefix from a reference string…
d-ronnqvist Oct 21, 2025
b27288d
accept sameShape constraint kind from SymbolKit (#1290)
QuietMisdreavus Oct 24, 2025
e15f4e1
Store all source languages in documentation node (#1326)
snprajwal Oct 31, 2025
15dde00
trim whitespace in doxygen formatter assertion (#1329)
QuietMisdreavus Nov 3, 2025
7b74f5c
build: add an initial CMake based build system for DocC (#818)
compnerd Nov 4, 2025
45aa567
Emit variants if any root module is a symbol kind (#1333)
snprajwal Nov 6, 2025
b816349
Exclude CMakeLists.txt files from SwiftPM targets (#1335)
snprajwal Nov 6, 2025
a211e37
Fix typo in doc comment for NavigatorItem.init?(rawValue:) (#1340)
ole Nov 10, 2025
d616aa5
Rename two internal targets for clarity (#1330)
d-ronnqvist Nov 10, 2025
f2a841e
Revert "Rename two internal targets for clarity (#1330)"
etcwilde Nov 10, 2025
ae6a083
build: repair linker detection with CMake
compnerd Nov 10, 2025
8beb703
Index external entities after local entities (#1328)
anferbui Nov 11, 2025
7db36ad
Support decoding link summaries with absolute paths to external pages…
d-ronnqvist Nov 11, 2025
304804b
Speed up directory monitoring tests (#1325)
snprajwal Nov 12, 2025
758f91e
Add a public initializer to RenderContentMetadata (#1337)
patshaughnessy Nov 12, 2025
9aabe36
Make `CodableContentSection.section` property public (#1344)
mayaepps Nov 12, 2025
a9569b4
Improve parsing of links with type disambiguation that include generi…
d-ronnqvist Nov 12, 2025
0b356e8
Warn when an article would override a symbol page (#1339)
d-ronnqvist Nov 12, 2025
cfcd96f
(#1257) Combined module link issue - public extension of dependent mo…
mgrebenets Nov 12, 2025
20a0c8b
Encode absolute presentation URL if present (#1346)
anferbui Nov 13, 2025
4864758
Reset unsupported metadata configuration like the doc comment says (#…
d-ronnqvist Nov 14, 2025
70a8a0d
Create new target for common code (#1331)
d-ronnqvist Nov 14, 2025
5370377
resolves mismatched in OpenAPI resource specs for type generation (#1…
heckj Nov 14, 2025
a3f9fda
build: move incorrect file movement (#1356)
compnerd Nov 17, 2025
2ee8148
fix: fixed MultipleChoice symbol in Assessments docs (#1357)
VictorPuga Nov 18, 2025
a42ebbf
RenderIndex.Node accepts an optional type (#1360)
mayaepps Nov 19, 2025
5915e66
Make a number of RenderNode constants vars (#1350)
mayaepps Nov 21, 2025
d3d19c3
Fix api collection icon rendering (#1343)
RalucaP Dec 1, 2025
8089d30
[Low level] Store SourceLanguage properties outside of the main struc…
d-ronnqvist Dec 1, 2025
f24b0d3
Re-enable test (#1363)
d-ronnqvist Dec 1, 2025
b2975d8
Add '.nojekyll' file in the 'docs' output so that the prebuilt docume…
d-ronnqvist Dec 1, 2025
4fa4af9
fixing metadata name
heckj Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#[[
This source file is part of the Swift open source project

Copyright © 2014 - 2025 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
#]]

cmake_minimum_required(VERSION 3.24)

# FIXME: The C language is enabled as `GNUInstallDirs` requires the language to
# function properly. We must further enable the language in the initial set to
# ensure that the correct linker is detected.
project(SwiftDocC
LANGUAGES C Swift)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
set(CMAKE_Swift_LANGUAGE_VERSION 5)

include(GNUInstallDirs)

# NOTE(compnerd) workaround CMake issues
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>")
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature ConciseMagicFile>")
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature ExistentialAny>")
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature InternalImportsByDefault>")

find_package(ArgumentParser)
find_package(SwiftASN1)
find_package(SwiftCrypto)
find_package(SwiftMarkdown)
find_package(LMDB)
find_package(SymbolKit)
find_package(cmark-gfm)

add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:-package-name;SwiftDocC>")

add_subdirectory(Sources)
27 changes: 26 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,32 @@ by running the test suite in a Docker environment that simulates Swift on Linux.
cd swift-docc
swift run docc
```


## Updating Build Rules

In order to build DocC as part of the Windows toolchain distribution uniformly,
a parallel CMake based build exists. Note that this is **not** supported for
development purposes (you cannot execute the test suite with this build).

CMake requires that the full file list is kept up-to-date. When adding or
removing files in a given module, the `CMakeLists.txt` list must be updated to
the file list.

The 1-line script below lists all the Swift files in the current directory tree.
You can use the script's output to replace the list of files in the CMakeLists.txt file for each target that you added files to or removed files from.

```bash
python -c "print('\n'.join((f'{chr(34)}{path}{chr(34)}' if ' ' in path else path) for path in sorted(str(path) for path in __import__('pathlib').Path('.').rglob('*.swift'))))"
```

This should provide the listing of files in the module that can be used to
update the `CMakeLists.txt` associated with the target.

In the case that a new target is added to the project, the new directory would
need to add the new library or executable target (`add_library` and
`add_executable` respectively) and the new target subdirectory must be listed in
the `Sources/CMakeLists.txt` (via `add_subdirectory`).

## Continuous Integration

Swift-DocC uses [swift-ci](https://ci.swift.org) infrastructure for its continuous integration
Expand Down
2 changes: 1 addition & 1 deletion Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 32 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
/*
This source file is part of the Swift.org open source project

Expand All @@ -15,6 +15,8 @@ import class Foundation.ProcessInfo
let swiftSettings: [SwiftSetting] = [
.unsafeFlags(["-Xfrontend", "-warn-long-expression-type-checking=1000"], .when(configuration: .debug)),

.swiftLanguageMode(.v5),

.enableUpcomingFeature("ConciseMagicFile"), // SE-0274: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0274-magic-file.md
.enableUpcomingFeature("ExistentialAny"), // SE-0335: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md
.enableUpcomingFeature("InternalImportsByDefault"), // SE-0409: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md
Expand All @@ -23,8 +25,8 @@ let swiftSettings: [SwiftSetting] = [
let package = Package(
name: "SwiftDocC",
platforms: [
.macOS(.v12),
.iOS(.v15)
.macOS(.v13),
.iOS(.v16)
],
products: [
.library(
Expand All @@ -41,17 +43,20 @@ let package = Package(
.target(
name: "SwiftDocC",
dependencies: [
.target(name: "DocCCommon"),
.product(name: "Markdown", package: "swift-markdown"),
.product(name: "SymbolKit", package: "swift-docc-symbolkit"),
.product(name: "CLMDB", package: "swift-lmdb"),
.product(name: "Crypto", package: "swift-crypto"),
],
exclude: ["CMakeLists.txt"],
swiftSettings: swiftSettings
),
.testTarget(
name: "SwiftDocCTests",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
resources: [
Expand All @@ -67,16 +72,19 @@ let package = Package(
name: "SwiftDocCUtilities",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.product(name: "NIOHTTP1", package: "swift-nio", condition: .when(platforms: [.macOS, .iOS, .linux, .android])),
.product(name: "ArgumentParser", package: "swift-argument-parser")
],
exclude: ["CMakeLists.txt"],
swiftSettings: swiftSettings
),
.testTarget(
name: "SwiftDocCUtilitiesTests",
dependencies: [
.target(name: "SwiftDocCUtilities"),
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
resources: [
Expand All @@ -91,6 +99,7 @@ let package = Package(
name: "SwiftDocCTestUtilities",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.product(name: "SymbolKit", package: "swift-docc-symbolkit"),
],
swiftSettings: swiftSettings
Expand All @@ -102,8 +111,28 @@ let package = Package(
dependencies: [
.target(name: "SwiftDocCUtilities"),
],
exclude: ["CMakeLists.txt"],
swiftSettings: swiftSettings
),

// A few common types and core functionality that's useable by all other targets.
.target(
name: "DocCCommon",
dependencies: [
// This target shouldn't have any local dependencies so that all other targets can depend on it.
// We can add dependencies on SymbolKit and Markdown here but they're not needed yet.
],
swiftSettings: [.swiftLanguageMode(.v6)]
),

.testTarget(
name: "DocCCommonTests",
dependencies: [
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),

// Test app for SwiftDocCUtilities
.executableTarget(
Expand All @@ -123,7 +152,6 @@ let package = Package(
],
swiftSettings: swiftSettings
),

]
)

Expand Down
13 changes: 13 additions & 0 deletions Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#[[
This source file is part of the Swift open source project

Copyright © 2014 - 2025 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
#]]

add_subdirectory(DocCCommon)
add_subdirectory(SwiftDocC)
add_subdirectory(SwiftDocCUtilities)
add_subdirectory(docc)
13 changes: 13 additions & 0 deletions Sources/DocCCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#[[
This source file is part of the Swift open source project

Copyright © 2014 - 2025 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
#]]

add_library(DocCCommon STATIC
FixedSizeBitSet.swift
Mutex.swift
SourceLanguage.swift)
Loading