-
Notifications
You must be signed in to change notification settings - Fork 314
Support indexing a file in the context of multiple targets #2038
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
Conversation
7cd47f8
to
cd6db00
Compare
swiftlang/swift-package-manager#8332 @swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test |
@swift-ci Please test Windows |
1 similar comment
@swift-ci Please test Windows |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
1 similar comment
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
ba1d435
to
2aa53d4
Compare
swiftlang/swift-package-manager#8332 @swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
2aa53d4
to
4a6ea29
Compare
swiftlang/swift-package-manager#8332 @swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
2 similar comments
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
4a6ea29
to
b3b65a2
Compare
swiftlang/swift-package-manager#8332 @swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
swiftlang/swift-package-manager#8332 @swift-ci Please test macOS |
…ports background indexing
…f a separate request We need a mapping from source file to its output path in order to support source files that are part of multiple targets (because we need the output path to check if we have an up-to-date unit for a file in a given target). To achieve this mapping, it’s easier to tag the output path for each source file onto the `buildTarget/sources` request.
If a source file is part of multiple targets, we should index it in the context of all of those targets because the different targets may produce different USRs since they might use different build settings to interpret the file.
b3b65a2
to
88b40f3
Compare
@swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test |
Sources/BuildServerProtocol/Messages/BuildTargetSourcesRequest.swift
Outdated
Show resolved
Hide resolved
swiftlang/swift-package-manager#8332 @swift-ci Please test |
swiftlang/swift-package-manager#8332 @swift-ci Please test Windows |
… a `BuildDescription` (#8332) We need the mapping from source file to output file in SourceKit-LSP, so the old approach of returning all output paths in a separate property does not work. Return them in a single property instead. This will be used in SourceKit-LSP by swiftlang/sourcekit-lsp#2038.
If a source file is part of multiple targets, we should index it in the context of all of those targets because the different targets may produce different USRs since they might use different build settings to interpret the file.
This also requires us to have a mapping from source file to output file, which is why I made the output path a property on the
buildTarget/sources
BSP request instead of having a standalone request that returns all output paths for a target.