-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SR-15434] Add support for custom (non-framework) module kinds (#33)
* Add option to provide a default module kind Resolves rdar://83448323 and SR-15434. * Update DocC's user documentation with custom module kind In this context, DocC is a "Tool" not a "Framework".
- Loading branch information
1 parent
f1543f0
commit 0752acf
Showing
9 changed files
with
260 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 202 additions & 0 deletions
202
...Test Bundles/BundleWithExecutableModuleKind.docc/ExampleDocumentedExecutable.symbols.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
{ | ||
"metadata": { | ||
"formatVersion": { | ||
"major": 0, | ||
"minor": 5, | ||
"patch": 3 | ||
}, | ||
"generator": "Apple Swift version 5.5 (swiftlang-1300.0.29.1 clang-1300.0.28.1)" | ||
}, | ||
"module": { | ||
"name": "ExampleDocumentedExecutable", | ||
"platform": { | ||
"architecture": "arm64", | ||
"vendor": "apple", | ||
"operatingSystem": { | ||
"name": "macosx", | ||
"minimumVersion": { | ||
"major": 10, | ||
"minor": 10, | ||
"patch": 0 | ||
} | ||
} | ||
} | ||
}, | ||
"symbols": [ | ||
{ | ||
"kind": { | ||
"identifier": "swift.struct", | ||
"displayName": "Structure" | ||
}, | ||
"identifier": { | ||
"precise": "s:27ExampleDocumentedExecutableAAV", | ||
"interfaceLanguage": "swift" | ||
}, | ||
"pathComponents": [ | ||
"ExampleDocumentedExecutable" | ||
], | ||
"names": { | ||
"title": "ExampleDocumentedExecutable", | ||
"navigator": [ | ||
{ | ||
"kind": "identifier", | ||
"spelling": "ExampleDocumentedExecutable" | ||
} | ||
], | ||
"subHeading": [ | ||
{ | ||
"kind": "keyword", | ||
"spelling": "struct" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "identifier", | ||
"spelling": "ExampleDocumentedExecutable" | ||
} | ||
] | ||
}, | ||
"docComment": { | ||
"lines": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 55 | ||
} | ||
}, | ||
"text": "This is a description of what this executable does." | ||
} | ||
] | ||
}, | ||
"declarationFragments": [ | ||
{ | ||
"kind": "attribute", | ||
"spelling": "@main" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "keyword", | ||
"spelling": "struct" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "identifier", | ||
"spelling": "ExampleDocumentedExecutable" | ||
} | ||
], | ||
"accessLevel": "internal", | ||
"location": { | ||
"uri": "file:///Users/demo/Downloads/ExampleDocumentedExecutable/Sources/ExampleDocumentedExecutable/ExampleDocumentedExecutable.swift", | ||
"position": { | ||
"line": 2, | ||
"character": 14 | ||
} | ||
} | ||
}, | ||
{ | ||
"kind": { | ||
"identifier": "swift.type.method", | ||
"displayName": "Type Method" | ||
}, | ||
"identifier": { | ||
"precise": "s:27ExampleDocumentedExecutableAAV4mainyyFZ", | ||
"interfaceLanguage": "swift" | ||
}, | ||
"pathComponents": [ | ||
"ExampleDocumentedExecutable", | ||
"main()" | ||
], | ||
"names": { | ||
"title": "main()", | ||
"subHeading": [ | ||
{ | ||
"kind": "keyword", | ||
"spelling": "static" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "keyword", | ||
"spelling": "func" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "identifier", | ||
"spelling": "main" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": "()" | ||
} | ||
] | ||
}, | ||
"functionSignature": { | ||
"returns": [ | ||
{ | ||
"kind": "text", | ||
"spelling": "()" | ||
} | ||
] | ||
}, | ||
"declarationFragments": [ | ||
{ | ||
"kind": "keyword", | ||
"spelling": "static" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "keyword", | ||
"spelling": "func" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": " " | ||
}, | ||
{ | ||
"kind": "identifier", | ||
"spelling": "main" | ||
}, | ||
{ | ||
"kind": "text", | ||
"spelling": "()" | ||
} | ||
], | ||
"accessLevel": "internal", | ||
"location": { | ||
"uri": "file:///Users/username/Downloads/ExampleDocumentedExecutable/Sources/ExampleDocumentedExecutable/ExampleDocumentedExecutable.swift", | ||
"position": { | ||
"line": 3, | ||
"character": 23 | ||
} | ||
} | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"kind": "memberOf", | ||
"source": "s:27ExampleDocumentedExecutableAAV4mainyyFZ", | ||
"target": "s:27ExampleDocumentedExecutableAAV" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
Tests/SwiftDocCTests/Test Bundles/BundleWithExecutableModuleKind.docc/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleName</key> | ||
<string>ExampleDocumentedExecutable</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>My Executable</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>org.swift.Executable</string> | ||
<key>CFBundleVersion</key> | ||
<string>0.1.0</string> | ||
<key>CDDefaultModuleKind</key> | ||
<string>Executable</string> | ||
</dict> | ||
</plist> |