-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Previous ID | SR-1639 |
Radar | None |
Original Reporter | @modocache |
Type | Sub-task |
Status | Closed |
Resolution | Done |
Attachment: Download
Additional Detail from JIRA
Votes | 0 |
Component/s | Package Manager, XCTest |
Labels | Sub-task |
Assignee | @briancroom |
Priority | Medium |
md5: e2fa900ee64d58b2f3449789c3d4d373
Parent-Task:
- SR-710 Generate XCTestCaseProvider entries on Linux
blocks:
- SR-1676 Build SourceKit on Linux
Issue Description:
Several SourceKit functions are declared in tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h
or tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h
, but only implemented in tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
. These need implementations that are only included in builds of SourceKit that use an in-process communication model (in other words, not XPC).
Examples of missing implementations include sourcekitd_request_array_create
and createErrorRequestInvalid
. There are many more.
I noticed these missing implementations when attempting to build SourceKit for Linux (full output available here and as a attachment on this task).
To build SourceKit on Linux yourself, apply swiftlang/swift#2763 and swiftlang/swift#2704 to a branch based off the master branch of apple/swift, then run utils/build-script -R
.
Taking the unique symbols from the build output above, I think the following will need "in-process" definitions:
Declared in SourceKit/include/SourceKit/Support/Concurrency.h
, implemented for OS X in SourceKit/lib/Support/Concurrency-Mac.cpp
:
-
SourceKit::WorkQueue::Impl::create(SourceKit::WorkQueue::Dequeuing, SourceKit::WorkQueue::Priority, llvm::StringRef)
-
SourceKit::WorkQueue::Impl::dispatch(void*, SourceKit::WorkQueue::DispatchData const&)
-
SourceKit::WorkQueue::Impl::dispatchBarrierSync(void*, SourceKit::WorkQueue::DispatchData const&)
-
SourceKit::WorkQueue::Impl::dispatchConcurrent(SourceKit::WorkQueue::Priority, SourceKit::WorkQueue::DispatchData const&)
-
SourceKit::WorkQueue::Impl::dispatchOnMain(SourceKit::WorkQueue::DispatchData const&)
-
SourceKit::WorkQueue::Impl::dispatchSync(void*, SourceKit::WorkQueue::DispatchData const&)
-
SourceKit::WorkQueue::Impl::release(void*)
I think these need implementations for Linux.
Declared in tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h
, implemented for OS X in tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
:
-
sourcekitd_request_array_create
-
sourcekitd_request_array_set_value
-
sourcekitd_request_dictionary_create
-
sourcekitd_request_dictionary_set_value
-
sourcekitd_request_int64_create
-
sourcekitd_request_release
-
sourcekitd_request_retain
-
sourcekitd_request_string_create
-
sourcekitd_request_uid_create
-
sourcekitd_response_dispose
-
sourcekitd_response_error_get_description
-
sourcekitd_response_error_get_kind
-
sourcekitd_response_get_value
-
sourcekitd_response_is_error
-
sourcekitd_uid_get_from_buf
-
sourcekitd_uid_get_length
-
sourcekitd_uid_get_string_ptr
I think these need implementations for Linux.
Declared in tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h
, implemented for OS X in tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
:
-
sourcekitd::RequestDict::dictionaryArrayApply(SourceKit::UIdent, llvm::function_ref<bool (sourcekitd::RequestDict)>)
-
sourcekitd::RequestDict::getDictionary(SourceKit::UIdent)
-
sourcekitd::RequestDict::getInt64(SourceKit::UIdent, long&, bool)
-
sourcekitd::RequestDict::getString(SourceKit::UIdent)
-
sourcekitd::RequestDict::getStringArray(SourceKit::UIdent, llvm::SmallVectorImpl<char const*>&, bool)
-
sourcekitd::RequestDict::getUID(SourceKit::UIdent)
-
sourcekitd::RequestDict::getUIDArray(SourceKit::UIdent, llvm::SmallVectorImpl<sourcekitd_uid_s*>&, bool)
-
sourcekitd::ResponseBuilder::Array::appendDictionary()
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, SourceKit::UIdent)
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, char const*)
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, llvm::ArrayRef<llvm::StringRef>)
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, llvm::StringRef)
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, long)
-
sourcekitd::ResponseBuilder::Dictionary::set(SourceKit::UIdent, sourcekitd_uid_s*)
-
sourcekitd::ResponseBuilder::Dictionary::setArray(SourceKit::UIdent)
-
sourcekitd::ResponseBuilder::Dictionary::setBool(SourceKit::UIdent, bool)
-
sourcekitd::ResponseBuilder::Dictionary::setCustomBuffer(SourceKit::UIdent, sourcekitd::CustomBufferKind, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >)
-
sourcekitd::ResponseBuilder::Dictionary::setDictionary(SourceKit::UIdent)
-
sourcekitd::ResponseBuilder::ResponseBuilder()
-
sourcekitd::ResponseBuilder::createResponse()
-
sourcekitd::ResponseBuilder::getDictionary()
-
sourcekitd::ResponseBuilder::~ResponseBuilder()
-
sourcekitd::createErrorRequestCancelled()
-
sourcekitd::createErrorRequestFailed(char const*)
-
sourcekitd::createErrorRequestInvalid(char const*)
-
sourcekitd::printRequestObject(void*, llvm::raw_ostream&)
I think these need implementations for Linux.
Declared in tools/SourceKit/include/SourceKit/Core/LangSupport.h
, implemented for all platforms in tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp
:
-
SourceKit::LangSupport::SynthesizedUSRSeparator
-
SourceKit::LangSupport::createSwiftLangSupport(SourceKit::Context&)
I think sourcekitdInProc
needs to be linked against SourceKitSwiftLang
to resolve these symbols.