Commit Graph

2331 Commits

Author SHA1 Message Date
Owen Voorhees
78b6759ba4 Merge pull request #30059 from owenv/sourcekit-edu-notes
[Diagnostics][SourceKit] Expose educational notes through SourceKit diagnostics request
2020-02-27 08:12:35 -08:00
Saleem Abdulrasool
97b322f466 swift-lang: moved to swift-stress-tester 2020-02-26 20:39:43 -08:00
Argyrios Kyrtzidis
4d337f2db2 [SourceKit] Turn-on by default the fast completion mode
rdar://59830963
2020-02-26 18:16:07 -08:00
Owen Voorhees
f11df3ee22 [Diagnostics][SourceKit] Expose diagnostic educational notes through SourceKit requests 2020-02-26 14:30:28 -08:00
Michael Ilseman
bfd0de4928 Revert "Revert "Revert "swift-lang: shuffle the source directory structure (N…" 2020-02-20 15:39:51 -08:00
Saleem Abdulrasool
f00cf8a1a3 Merge pull request #29941 from compnerd/it-just-works
Revert "Revert "swift-lang: shuffle the source directory structure (N…
2020-02-20 08:13:03 -08:00
Argyrios Kyrtzidis
3d5cb90904 Merge pull request #29938 from akyrtzi/annotated-property-wrapper-attribute
[ASTPrinter] When printing a property wrapper attribute name for the fully annotated declaration, make sure that it is wrapped within the `syntaxtype.attribute.name` tag
2020-02-19 16:41:25 -08:00
Saleem Abdulrasool
200b96df81 Revert "Revert "swift-lang: shuffle the source directory structure (NFC)""
This reverts commit beb8ecd8cc.  Add a
workaround for the dependency issue.

It is unclear why `sourcekitd` is getting added improperly as a
dependency on `lib/sourcekitd.framework/sourcekitd`.  This workaround
adjusts the dependency such that we end up with a dependency on
`lib/sourcekitd.framework/Versions/A/sourcekitd` as an order-only
dependency.  This should fix the compile issue.  I am unable to
reproduce this issue with the `add_library` usage for adding a Swift
library.  This allows us to cleave the host and target libraries, and so
the workaround is sufficient to make progress and the problem will be
resolved with the migration towards CMake for handling the dependencies.
2020-02-19 16:09:37 -08:00
Argyrios Kyrtzidis
11e79dc665 [SourceKit] Remove a globally shared variable from inside a method that doesn't seem to get used anymore 2020-02-19 14:42:23 -08:00
Ben Langmuir
beb8ecd8cc Revert "swift-lang: shuffle the source directory structure (NFC)"
This reverts commit edbe22b63c.
2020-02-19 13:33:08 -08:00
Brent Royal-Gordon
f8df2f66fd Add mechanism for per-SourceFile overlays
When a “separately imported overlay” is added to a SourceFile, two things happen:

1. The direct import of the underlying module is removed from getImports*() by default. It is only visible if the caller passes ImportFilterKind:: ShadowedBySeparateOverlay. This means that non-module-scoped lookups will search _OverlayModule before searching its re-export UnderlyingModule, allowing it to shadow underlying declarations.

2. When you ask for lookupInModule() to look in the underlying module in that source file, it looks in the overlays instead. This means that UnderlyingModule.foo() can find declarations in _OverlayModule.
2020-02-18 11:07:12 -08:00
Saleem Abdulrasool
61832cb3da Merge pull request #29823 from compnerd/swift-lang-rises
swift-lang: shuffle the source directory structure (NFC)
2020-02-18 08:22:36 -08:00
Nathan Hawes
0516c3b74f Merge pull request #29857 from nathawes/avoid-mangling-in-document-structure-request
[SourceKit] Don't report the ObjC runtime name without @objc(Name)
2020-02-17 15:27:26 -08:00
Saleem Abdulrasool
edbe22b63c swift-lang: shuffle the source directory structure (NFC)
This moves the swift-lang library out of the tools/SourceKit directory
and into the stdlib directory.  As it stands, the library required that
the standard library and the SDK overlay was being built.  This is
implicitly done when building the stdlib subdirectory.  Furthermore, it
had an odd tie between the flags for Swift and SourceKit which now have
the logic separated.  This clearly delineates the host and target
components in the repository.
2020-02-16 19:12:47 -08:00
Nathan Hawes
2420b6d28b [SourceKit] Don't report the ObjC runtime name without @objc(Name)
We used to compute the mangled name in other cases, but document structure is
a syntactic request and can't guarantee that the class/protocol we're getting
the mangled name of is valid in any way so it often breaks assumptions in the
mangler and causes it to crash. It's not clear if the runtime_name is actually
being used anymore, so this change restricts reporting it to just the cases
where we don't need to mangle.

rdar://problem/40956377
2020-02-14 11:40:09 -08:00
Ben Langmuir
18455e6aec Merge pull request #29558 from ahoppen/sema-enabled-notificaiton
[sourcekitd] Send a notification when semantic functionality is enabled again
2020-02-14 07:10:56 -08:00
swift-ci
da0853040a Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-07 16:44:33 -08:00
Nathan Hawes
e200165251 Merge pull request #29702 from johnfairh/cursorinfo-module-name
[SourceKit] Fix cursorinfo key.modulename with sourceinfo
2020-02-07 16:29:36 -08:00
John Fairhurst
0e8f4d4f32 [SourceKit] Fix cursorinfo.modulename with sourceinfo 2020-02-07 12:24:16 +00:00
swift-ci
23021d96fc Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-06 11:04:29 -08:00
Rintaro Ishizaki
cc8d4965f8 [CodeCompletion] Ensure cached results have 'unknown' type relation 2020-02-05 17:05:23 -08:00
Rintaro Ishizaki
c31bfaeeed [CodeCompletion] Introduce 'Unknown' type relation
Now

* NotApplicable: The result is not relevant for type relation (e.g.
  keywords, and overloads)
* Unknown: the relation was not calculated (e.g. cached results), or the
  context type is unknown.
* Invalid: The result type is invalid for this context (i.e. 'Void' for
  non-'Void' context)
* Unrelated: The result type has no relation to the context type
* Convertible: The result type is convertible to the context type
* Identical: The result type is identical to the context type
2020-02-05 14:23:59 -08:00
Rintaro Ishizaki
17abedf1ef [CodeCompletion] Introduce 'NotApplicable' type relation
For keywords, and overrides.
2020-02-05 14:23:59 -08:00
swift-ci
895294a7d1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-05 11:03:43 -08:00
Rintaro Ishizaki
c722b1aa5b Merge pull request #29624 from rintaro/sourcekit-typerelation-rdar59066560
[SourceKit] Expose 'ExpectedTypeRelation' for the completion results
2020-02-05 10:51:09 -08:00
swift-ci
bc7bebadc9 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-04 08:02:45 -08:00
Daniel Rodríguez Troitiño
713e6360e6 Merge pull request #29454 from buttaface/skd-test
[sourcekitd-test] Remove LLVM Core static library that is getting linked twice
2020-02-04 07:56:01 -08:00
Rintaro Ishizaki
1e74c39956 [SourceKit] Expose ExpectedTypeRelation for the completion results
So that clients can sort the results using this.

rdar://problem/59066560
2020-02-03 15:57:43 -08:00
swift-ci
ba49f06221 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-30 17:03:10 -08:00
Alex Hoppen
cb26625f5d [sourcekitd] Send a notification when semantic functionality is enabled again 2020-01-30 15:47:13 -08:00
Rintaro Ishizaki
e121cb09cd Revert "[SourceKit] Disable module system headers validation"
This reverts commit 951b85359a.
2020-01-30 15:04:07 -08:00
Butta
1d747bc351 [sourcekitd-test] Remove redundant LLVMCore static library
This library is already supplied by the LLVM CMake config, so adding it here
sometimes causes the CommandLine option parser to fail, as it registers the
same option twice.
2020-01-29 11:32:37 +05:30
swift-ci
0373bc26c1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 08:03:20 -08:00
Saleem Abdulrasool
a1c971907b build: repair the Windows build
This should repair the Windows build after #29451.  The quoting
behaviour was incorrect and was constructing an invalid compiler
invocation.  Solve the issue by using `target_include_directories`
instead.  However, since this needs the target, hoist the flag
computation to the local sites.  This replicates more logic because of
the custom build trying to replicate the CMake build logic in CMake.
2020-01-27 22:35:28 -08:00
swift-ci
8c23dec23e Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 09:04:20 -08:00
Saleem Abdulrasool
d8b3b626fe build: use modern target property handling
Use specific operations for setting the compile flags, link flags,
linked libraries, and library search paths.  This allows us to use CMake
more effectively, simplifies the logic, and will ensure that flags are
not duplicated.
2020-01-25 16:08:51 -08:00
swift-ci
ca63366ce1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-24 14:04:24 -08:00
Ben Langmuir
f8ebc98483 [sourcekitd-test] When setting -fmodules-cache-path also set -fmodules
When doing header interface generation, we interpret clang command-line
arguments in `initInvocationByClangArguments` and attempt to setup a
matching Swift compiler invocation. One important argument is the module
cache, but clang will only interpret `-fmodules-cache-path` if modules
are enabled (typically with `-fmodules`). While the header itself might
not need modules, Swift will import its own shims module and during
testing this needs to honour lit's provided cache. So we add -fmodules
in sourcekitd-test anytime we add -fmodules-cache-path.

rdar://58836540
2020-01-24 11:45:23 -08:00
Mike Ash
cd2b54f74e Merge branch 'master' into master-rebranch 2020-01-24 11:30:32 -05:00
Saleem Abdulrasool
d3f72155d8 Merge pull request #29399 from compnerd/sk-rpath
build: move the RPATH handling to the executables
2020-01-24 08:19:27 -08:00
Saleem Abdulrasool
9d8d013ade Merge pull request #29383 from compnerd/exclude-exclusion
build: remove support for `EXCLUDE_FROM_ALL` (NFC)
2020-01-24 08:17:45 -08:00
Saleem Abdulrasool
04affa2b9f build: use the new libedit imported library
Use the imported library to track header search path and library search
paths and dependencies rather than replicating that knowledge.
2020-01-23 14:24:06 -08:00
Saleem Abdulrasool
bc21d4ff46 build: move the RPATH handling to the executables
This moves the handling of the RPATH and the exported symbol to the
binary themselves.  The exported symbol is needed due to the use of the
exported symbol list.  This makes the small difference that `_main` is
always exported on Darwin which is not strictly needed in ASAN as ASAN
provides the entry point.

The RPATH is only setup on installation which is sufficient for testing
purposes as CMake ensures that the libraries are fully linked and will
be loaded properly when run from the build tree.
2020-01-23 13:38:22 -08:00
Saleem Abdulrasool
1f961414a5 build: remove support for EXCLUDE_FROM_ALL (NFC)
This parameter is unused.  Simply remove the option from the
`add_swift_sourcekit_executable`.
2020-01-23 12:44:28 -08:00
swift-ci
d31da5d08d Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 14:03:45 -08:00
Ben Langmuir
a989b8a978 Merge pull request #29357 from benlangmuir/lit-subst-mcp-sourcekit
[sourcekit] Add global -module-cache-path to test executables
2020-01-22 13:45:56 -08:00
Ben Langmuir
8b8ec5372e [sourcekit] Add global -module-cache-path to test executables
Add a global -module-cache-path option to `sourcekitd-test` and
`complete-test` and have lit provide the default module cache in its
substitutions. Previously many tests have explicitly provided the
`%mcp_opt` option, but this is easy to forget when writing new tests.

The module cache is inserted into the compiler arguments at the
beginning so that it's still possible for a test to override it with a
per-test cache if desired.

rdar://58752842
2020-01-22 11:04:52 -08:00
Erik Eckstein
bbfaccda4b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 08:25:23 +01:00
Devin Coughlin
082421048a [AST/Sema] Add availability attributes for macCatalyst
Add a platform kind and availability attributes for macCatalyst. macCatalyst
uses iOS version numbers and inherits availability from iOS attributes unless
a macCatalyst attribute is explicitly provided.
2020-01-21 20:27:14 -08:00
Erik Eckstein
1b312a85bd Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-16 10:39:20 +01:00