Skip to content

Build: add group information for IDE's interface rendering. #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
WORKSPACE_DIR + '/swift/utils/incrparse/incr_transfer_round_trip.py'
GYB_EXEC = WORKSPACE_DIR + '/swift/utils/gyb'
LIT_EXEC = WORKSPACE_DIR + '/llvm/utils/lit/lit.py'
GROUP_INFO_PATH = PACKAGE_DIR + '/utils/group.json'

### Generate Xcode project

Expand Down Expand Up @@ -184,6 +185,11 @@ def get_swiftpm_invocation(spm_exec, build_dir, parser_header_dir,

# To speed up compilation.
swiftpm_call.extend(['-Xswiftc', '-enforce-exclusivity=unchecked'])

# To build the group information into the module documentation file
swiftpm_call.extend(['-Xswiftc', '-Xfrontend', '-Xswiftc', '-group-info-path'])
swiftpm_call.extend(['-Xswiftc', '-Xfrontend', '-Xswiftc', GROUP_INFO_PATH])

return swiftpm_call

def build_swiftsyntax(swift_build_exec, swiftc_exec, build_dir,
Expand Down
42 changes: 42 additions & 0 deletions utils/group.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"SyntaxNodes": [
"SyntaxData.swift",
"TokenKind.swift",
"Syntax.swift",
"Trivia.swift",
"RawSyntax.swift",
"SyntaxKind.swift",
"SyntaxNodes.swift",
"SyntaxCollections.swift",
"SourcePresence.swift",
"SyntaxChildren.swift",
],
"Utils": [
"SyntaxBuilders.swift",
"SyntaxFactory.swift",
"SyntaxRewriter.swift",
"SyntaxClassifier.swift",
"SyntaxClassification.swift",
],
"Diagnostic": [
"DiagnosticConsumer.swift",
"JSONDiagnosticConsumer.swift",
"PrintingDiagnosticConsumer.swift",
"DiagnosticEngine.swift",
"Diagnostic.swift",
"SyntaxVerifier.swift",
],
"Position": [
"AbsolutePosition.swift",
"Utils.swift",
"SourceLocation.swift",
"SourceLength.swift",
],
"Parse": [
"SyntaxParser.swift",
"IncrementalParseTransition.swift",
],
"Internal": [
"AtomicCounter.swift",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it required that all files are listed ? "AtomicCounter.swift" doesn't contain any public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is required unfortunately. But in practice no users would jump to this group by clicking on any APIs.

]
}