Skip to content

Expose the name of every symbol in the index #74

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
Mar 13, 2020
Merged

Conversation

emixb
Copy link
Contributor

@emixb emixb commented Mar 13, 2020

There are scenarios where one wants to iterate through the list of all the symbols in the index. Such functionality exists in the underlying lower-level library.

This PR makes that functionality available to indexstore-db users.

Copy link
Contributor

@akyrtzi akyrtzi left a comment

Choose a reason for hiding this comment

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

Thanks for this enhancement!
I have a suggestion for an API change and also please add a unit test for this.

}

/// Returns a set with every symbol in the index.
public func allSymbolNames() -> Set<String> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be a Set, indexstoredb_index_symbol_names is going to return unique strings.
I'd recommend to change it to array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Add tests for IndexStoreDB.allSymbolNames()
@emixb emixb requested a review from akyrtzi March 13, 2020 19:06
@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 13, 2020

@swift-ci Please test

@akyrtzi akyrtzi merged commit b99f773 into swiftlang:master Mar 13, 2020
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.

2 participants