Skip to content

[5.6] Make the symbol graph extraction requested by plugins more robust (#3993) #3998

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

Conversation

abertelrud
Copy link
Contributor

This is the 5.6 nomination of #3993.

…iftlang#3993)

* Rework the SymbolGraphExtract so it's more suitable for being called in the context of plugins.

This includes parameterizing the output format and the output path, as well as the diagnostics that are printed, and applying the extractor to a target at a time and not always to all the targets in a package.  The original behavior for the `dump-symbol-graph` command is unmodified, but some of the specifics are hoisted into the DumpSymbolGraph command implementation rather than in the reusable SymbolGraphExtract type.

* Make the symbol graph generation more robust by using the refactored SymbolGraphExtract:

- only generate symbol graph information for the specified target
- use a unique symbol graph output directory for each package/target combination
- added a unit test to check these things.

* Skip the test in a bootstrap situation where we're using a Swift compiler that hasn't built the `swift-symbolgraph-extract` tool.  There is a `SWIFT_SYMBOLGRAPH_EXTRACT` env var that could be used to point it another binary, but on platforms other than macOS we don't have an existing Xcode or anything that would be guaranteed to contain this tool.  This test should still run on full builds and on self tests, where the tool is available.

rdar://87234110&86785765
(cherry picked from commit 850c772)
@abertelrud abertelrud changed the title Make the symbol graph extraction requested by plugins more robust (#3993) [5.6] Make the symbol graph extraction requested by plugins more robust (#3993) Jan 9, 2022
@abertelrud abertelrud self-assigned this Jan 9, 2022
@abertelrud abertelrud added 5.6 ready Author believes the PR is ready to be merged & any feedback has been addressed labels Jan 9, 2022
@abertelrud
Copy link
Contributor Author

@swift-ci test

@abertelrud abertelrud merged commit 975f06a into swiftlang:release/5.6 Jan 9, 2022
@abertelrud abertelrud deleted the eng/5.6-symbolication-path branch January 9, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants