-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Pass dump-symbol-graph
flags to symbolgraph-extract
#3682
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
Pass dump-symbol-graph
flags to symbolgraph-extract
#3682
Conversation
dump-symbol-graph
flags to symbolgraph-extract
@abertelrud this is something that we should refactor out to a plugin when the underlying framework is in place. could you please review in that light. |
@swift-ci please smoke test |
I believe that the unit test failure is unrelated. I think I saw a different PR that resolves it, so probably just running the tests again after your amended fix will result in green builds. |
Passes flags from `swift package dump-symbol-graph` to `swift-symbolgraph-extract` The following flags are added: prettyPrint, skipSynthesisedMembers, minimumAccessLevel, skipInheritedDocs and skipInheritedDocs
d5f1ea2
to
58baf11
Compare
OK I amended a formatting change. I now
Can someone retrigger the smoke test @tomerd @abertelrud? |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
Passes flags from
swift package dump-symbol-graph
toswift-symbolgraph-extract
Motivation:
The package manager allows us to extract a symbol graph from a Swift Package without the need to manually specify the module-name, target, sdk and other compiler flags. But it is limited to extract public symbols only, because it takes away the ability to specify any of the
swift-symbolgraph-extract
configuration options (like access control etc.).This pull request adds some of the most useful configuration options of
swift-symbolgraph-extract
to the SPM tool and passes them through.Modifications:
The following flags are added to the
DumpSymbolGraph: SwiftCommand
:prettyPrint: Bool
skipSynthesisedMembers: Bool
minimumAccessLevel: AccessLevel
skipInheritedDocs: Bool
includeSpiSymbols: Bool
AccessLevel
is a new struct that I declared in theSymbolGraphExtract.swift
file.Result:
You can now dump symbol graphs with SPM
private
,fileprivate
,internal
,open
Usage instructions can be shown by executing
swift package dump-symbol-graph --help