Cursor info requires access to the underlying AST, which is not
thread-safe. This manifest as crashes when performing concurrent
cursor-info requests on the same generated interface. We already
prevented concurrent cursor-infos on regular Swift files by using the
ASTManager, but generated interfaces use the InterfaceGenContext which
may use either an ASTUnit or its own internal CompilerInstance.
rdar://problem/27311624
This resolves a number of failing tests caused by availability attributes
not getting imported for macOS.
(cherry picked from commit 4b566df9f3)
I've also reverted a bunch of master-next-only commits related to this issue
that disabled tests and made availability changes:
Revert "Disable test harder by fixing typo. REQUIRE => REQUIRES. = /."
This reverts commit 4dc1be4b95.
Revert "Disable more tests that are hit by upstream availability issues until Devin looks at them."
This reverts commit 8e0fcda35c.
Revert "[SourceKit] Narrow the test-disabling in cursor_info.swift"
This reverts commit 79f6d1d492.
Revert "[upstream-update] Work around availability issue."
This reverts commit f140a62cfb.
Typically, users jump to type-specific interface from a member of that type, for
instance, a.getSomething(). To generate the interface, we need to report the USR
of the container type of "getSomething()", which is the USR for the type of a,
when cursor info is requested for this function call.
The mangled name of the type is identical to those for debugger. These
mangled names allow us to reconstruct the type from AST and generate interface
specifically for that type.
Related rdar://27306890
This attribute is an implementation detail of how 'rethrows' works, and
you can't actually mark declarations @rethrows directly. So hide it
from cursor info, and other places that use the ASTPrinter.
rdar://problem/26638597
* A bunch of them require objc_interop because they import code containing
Objective-C.
* Many others fail on Ubuntu 14.04 because the C++ there doesn't have a
functional std::regex implementation which is required by the
`complete-test` tool.
It may be possible to adjust some of these tests in the future to not
need these extra requirements, but this is a straightforward way to
clean up Linux test results for now.
This reverts commit f723b86614 and
updates the IDE tests that incidentally included some punctuation.
No new tests are necessary - the character level tests are exercised
in cmark itself.
Unless you're familiar with the way the swift source code is organized,
it's not clear what "SourceDocInfo" means, or how it is different from
DocSupport, etc. Move the tests into directories that are named based
on their request (note: we already had one test under CursorInfo, which
just made things even more confusing).