Skip to content

[ParseableInterfaces] Handle swiftdoc files correctly #21512

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
Jan 9, 2019

Conversation

jrose-apple
Copy link
Contributor

The previous openModuleFiles interface in SerializedModuleLoaderBase still assumed that swiftmodule files and swiftdoc files would be found next to each other, but that's not true anymore with swiftinterfaces-built-to-modules. Give up on this assumption (and on the minor optimization of passing down a scratch buffer) and split out the interface into the customization point findModuleFilesInDirectory and the implementation openModuleFiles. The latter now takes two full paths: one for the swiftmodule, one for the swiftdoc.

Builds on top of #21398 because that's how I wrote them. The third commit is the relevant one.

When trying to load a swiftinterface, search this directory before
doing all the work of building a swiftmodule.
Makes this code easier to read. No functionality change.
The previous 'openModuleFiles' interface in SerializedModuleLoaderBase
still assumed that swiftmodule files and swiftdoc files would be found
next to each other, but that's not true anymore with
swiftinterfaces-built-to-modules. Give up on this assumption (and on
the minor optimization of passing down a scratch buffer) and split out
the interface into the customization point
'findModuleFilesInDirectory' and the implementation 'openModuleFiles'.
The latter now takes two full paths: one for the swiftmodule, one for
the swiftdoc.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

Merged as part of #21513.

@jrose-apple jrose-apple closed this Jan 9, 2019
@jrose-apple jrose-apple deleted the doc-of-the-bay branch January 9, 2019 22:59
@jrose-apple jrose-apple merged commit 5417ca0 into swiftlang:master Jan 9, 2019
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