Commit Graph

3682 Commits

Author SHA1 Message Date
Slava Pestov
0b0d7dcff9 Sema: Remove most of the remaining Swift 3 support 2018-10-08 18:43:52 -07:00
Nathan Hawes
5c568af436 [incrParse] Fix bug mapping a node's location back to its location in the cached syntax tree
Also fix Edit::intersectsOrTouchesRange check only returning true when the
ranges overlapped, rather than when they overlapped or 'touched'.

Resolves rdar://problem/45108439
2018-10-08 15:44:38 -07:00
Xi Ge
c8c7fb39b0 swift-module-digester: exclude fixed binary order when checking API stability. 2018-10-08 13:59:30 -07:00
Xi Ge
847aa9b327 swift-module-digester: avoid including private protocol conformances when checking API stability. 2018-10-08 13:30:30 -07:00
Xi Ge
382e27f4ab swift-module-digester: diagnose adding/removing final as ABI/API breakages. 2018-10-08 13:19:54 -07:00
Xi Ge
bfadd46d57 swift-module-digester: diagnose non-final function changes in non-resilient classes. 2018-10-08 12:15:55 -07:00
Xi Ge
8a769a0460 swift-module-digester: include non-resilient class decls when checking ABI stability. 2018-10-05 14:48:00 -07:00
Xi Ge
9cfc0dee79 swift-module-digester: keep track of whether a property/subscript has didSet and willSet. 2018-10-05 13:02:31 -07:00
swift-ci
0a4c1f19df Merge pull request #19722 from compnerd/winsk 2018-10-04 19:14:07 -07:00
Xi Ge
a1e66a0515 swift-module-digester: diagnose value ownership changes for parameters. 2018-10-04 18:02:45 -07:00
Saleem Abdulrasool
0df7b2f4be SourceKit: enable builds for Windows
SourceKit's build is now ammenable to building for Windows.  Generalize the path
to enable building it for Windows as well as Linux.  The libdispatch build for
the compiler is needed for all non-Darwin targets currently.
2018-10-04 16:44:54 -07:00
Xi Ge
5bab518d5f swift-module-digester: include parameters' value ownership values in the digests. 2018-10-04 15:57:56 -07:00
Xi Ge
78271f19a0 swift-module-digester: diagnose self access kind changes for function decls. 2018-10-04 15:57:56 -07:00
Saleem Abdulrasool
6ab8389ecf Merge pull request #19674 from compnerd/shared-blocks-are-back
SourceKit: use shared BlocksRuntime
2018-10-04 15:31:57 -07:00
Erik Eckstein
8997a0e831 swift-demangle: Also accept $s symbols without the $ prefix.
This makes it easier to copy-paste $s symbols with a double-click.
We already had this for $S, now it also works for the new mangling prefix $s.
2018-10-04 12:53:58 -07:00
Nathan Hawes
b5b1d9ab23 Revert "[SourceKit] Make each Variant keep a strong reference to its SourceKitdResponse context" 2018-10-04 10:36:17 -07:00
Saleem Abdulrasool
a140c41ce0 build: be a bit more resilient
In the case that a system update temporarily breaks the command, the output may
be empty, and this can cause CMake to fail in a weird manner.  Quote the
variable to be more resilient to the transient failure.
2018-10-03 18:24:17 -07:00
Saleem Abdulrasool
7c9b6f03bf Merge pull request #19668 from compnerd/explicit-BlocksRuntime
SourceKit: explicitly link against BlocksRuntime as well
2018-10-03 18:13:36 -07:00
swift-ci
ebd4d9f67c Merge pull request #19680 from compnerd/exports 2018-10-03 16:43:33 -07:00
Nathan Hawes
700384aed4 Merge pull request #19689 from nathawes/keep-sourcekitd-response-alive-while-variant-lives
[SourceKit] Make each Variant keep a strong reference to its SourceKitdResponse context
2018-10-03 16:11:20 -07:00
Xi Ge
d36fc85535 swift-module-digester: include underscored and unavailable decls when checking stdlib abi stability. 2018-10-03 14:54:08 -07:00
Xi Ge
58b3c2173f swift-module-digester: use getEffectiveAccess() to get accessibility when checking ABI stability.
This allows us to include internal decls with @usableFromInline attribute, whose stored property
changes can effect ABI.
2018-10-03 14:06:53 -07:00
Saleem Abdulrasool
309e4dafc1 SourceKit: correct header include order
Internal.h must be included before sourcekitd.h to ensure that we get the
correct definition for Windows targets.  The inclusion of `sourcekitd.h` is not
needed after the inclusion of `Internal.h` so simply remove the inclusion.
2018-10-03 13:56:40 -07:00
Saleem Abdulrasool
e7bc37b748 SourceKit: explicitly link against BlocksRuntime as well
On Darwin platforms, libdispatch and libBlocksRuntime are re-exported from
libSystem (via LC_REEXPORT_DYLIB).  Other platforms do not have libdispatch and
libBlocksRuntime in their C runtime, so we need to explicitly link against them.
Now that we are building BlocksRuntime with hidden visibility, we do not
accidentally get the symbols from libdispatch.
2018-10-03 13:36:18 -07:00
Nathan Hawes
88b1ae9d50 [SourceKit] Make each Variant keep a strong reference to its SourceKitdResponse context
sourcekitd_variant_t is only safe to use while the sourcekitd_response_t it was
retrieved from is still alive, so keep a strong reference to SourceKitdResponse
(the Swift wrapper of sourcekitd_response_t) in each Variant (the Swift wrapper
of sourcekitd_variant_t).
2018-10-03 11:07:04 -07:00
Saleem Abdulrasool
3469797df5 SourceKit: use shared BlocksRuntime
Adjust the SourceKit's embedded libdispatch build to use the shared build of
BlocksRuntime now that we can generate that.
2018-10-03 09:27:49 -07:00
swift-ci
13b884ba6c Merge pull request #19673 from compnerd/error 2018-10-02 19:30:22 -07:00
Saleem Abdulrasool
2493b11f27 sourcekitd-test: be more error resilient
Ensure that we handle the error case as well.  Fix up the type mismatches in the
process.
2018-10-02 15:45:53 -07:00
Xi Ge
c2c04875d0 swift-module-digester: diagnose operator *fix notation changes. 2018-10-02 15:04:23 -07:00
Xi Ge
784cb9e1a9 Revert "swift-module-digester: diagnose added associated types as ABI breakages even they have default type." 2018-10-02 11:12:37 -07:00
Saleem Abdulrasool
33e9037f64 SourceKit: handle Windows codepaths better
Fill in some of the Windows codepaths that were previously missing.  This allows
us to at least compile the SourceKit sources.  More changes are required to the
build system to use the correct compiler when cross-compiling to get the
dependencies correct.
2018-10-01 21:35:14 -07:00
swift-ci
d401f96fb8 Merge pull request #19650 from compnerd/prefix-suffix 2018-10-01 17:22:30 -07:00
Xi Ge
a969486932 swift-module-digester: diagnose added associated types as ABI breakages even they have default type. 2018-10-01 16:00:36 -07:00
Xi Ge
8e81b59f4e swift-module-digester: diagnose fixed-order property changes to computed property and vice versa as ABI breakage. 2018-10-01 15:54:14 -07:00
Xi Ge
b3614a4b6f swift-module-digester: include unavailable variables with fixed layout order when checking ABI stability. 2018-10-01 15:02:41 -07:00
Saleem Abdulrasool
6c8c7151ff SourceKit: repair the build when cross-compiling
Not all targets (CMAKE_SYSTEM_NAME) use `lib` and `.a` for the static library
name.  Adjust the name properly for the host that we are building for.  This
repairs the build when performing a cross-compile from Linux to Windows.
2018-10-01 14:54:06 -07:00
Xi Ge
e5e61d4b25 Merge pull request #19647 from nkcsgexi/include-operator-decl
swift-module-digester: include operator declarations in the module dump.
2018-10-01 13:36:33 -07:00
swift-ci
9034066396 Merge pull request #19642 from compnerd/inproc-or-xpc 2018-10-01 12:29:28 -07:00
Xi Ge
9fcc59bcaf swift-module-digester: include operator declarations in the module dump.
Their changes should have no impact on ABI, but can be source-breaking.
2018-10-01 12:28:54 -07:00
Saleem Abdulrasool
daabc237fa SourceKit: libdispatch swift requires swift stdlib
When building libdispatch for SourceKit, only enable the swift overlay
components if the swift standard library is being built.  This allows building
just the compiler and SourceKit.
2018-10-01 10:02:17 -07:00
Saleem Abdulrasool
f1997236fe SourceKit: hoist decision for building InProc
The decision to whether build InProc or as an XPC service is needed for the
test tools as well.  Rather than recompute it for the tests as well, hoist it to
the top level for the SourceKit project.  This repairs the build of the
SourceKit tests on non-Darwin hosts.
2018-10-01 09:58:53 -07:00
Xi Ge
6a198b151a swift-module-digester: keep track of whether a decl is internal. 2018-09-30 18:53:35 -07:00
Xi Ge
226811007b swift-module-digester: refactor diagnostics logic. NFC 2018-09-29 20:18:29 -07:00
Xi Ge
d15f611acd Merge pull request #19620 from nkcsgexi/include-operator
swift-module-digester: include operator overloads in the module dump.
2018-09-28 20:35:57 -07:00
Xi Ge
a6f886c8b7 swift-module-digester: include operator overloads in the module dump. 2018-09-28 17:41:52 -07:00
Xi Ge
503c1ae8e2 Merge pull request #19608 from nkcsgexi/cache-comparison-results
swift-module-digester: slight performance enhancement to re-use node comparison results. NFC
2018-09-28 15:18:52 -07:00
Xi Ge
e31b04495e swift-module-digester: print node matching details in verbose mode for debugging purposes, NFC. 2018-09-28 13:50:09 -07:00
Bruno Rocha
bf84b297f8 [SourceKit] Allow module references to be indexed (#19243)
Module references get indexed as a 'module' symbol; they get USRs similar to how clang would assign a USR for a module reference.

JIRA: https://bugs.swift.org/browse/SR-8677
2018-09-28 12:21:38 -07:00
Xi Ge
b9c1cdefed swift-module-digester: keep track of whether a property or subscript has storage. 2018-09-28 11:36:36 -07:00
Xi Ge
459538f49a swift-module-digester: slight performance enhancement to re-use node comparison results. NFC 2018-09-28 11:05:57 -07:00