Skip to content

[Driver][SymbolGraph] add new flag -symbol-graph-minimum-access-level #39865

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 3 commits into from
Oct 29, 2021

Conversation

QuietMisdreavus
Copy link
Contributor

Resolves rdar://79099869

When generating a symbol graph, it's sometimes useful to include information for non-public symbols. However, symbol graphs generating during a compile were always forced to a "minimum access level" of "public". The only option was to run swift-symbolgraph-extract after the fact and use its -minimum-access-level flag. This PR adds a new flag to the driver, -symbol-graph-minimum-access-level, that allows users to specify access levels other than "public" when generating symbol graphs during a compile.

I also took the opportunity to strip out the symbol-graph-specific fields from SerializationOptions, in favor of pulling the SymbolGraphOptions directly from the CompilerInvocation that parses them from the args. (I added those args back in #38070, but didn't connect them all the way down to where they were used in the serialize() function. Here, i finished the job.)

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please smoke test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@artemcm
Copy link
Contributor

artemcm commented Oct 22, 2021

@swift-ci Please smoke test macOS platform

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

@QuietMisdreavus
Copy link
Contributor Author

Gonna retry the test in case that one error was a fluke with a stale cache...

@swift-ci Please smoke test macOS platform

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

@QuietMisdreavus
Copy link
Contributor Author

Using swiftlang/swift-driver#890

@swift-ci Please smoke test

@QuietMisdreavus
Copy link
Contributor Author

Using swiftlang/swift-driver#890

@swift-ci Please build toolchain macOS platform

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 583a45c

Install command
tar -zxf swift-PR-39865-1201-osx.tar.gz --directory ~/

@QuietMisdreavus QuietMisdreavus merged commit dd88e0d into main Oct 29, 2021
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/private-swiftc-symbols branch October 29, 2021 19:01
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